all repos — openbox @ 41010812fa1e891e162c88a3c962522832517cc4

openbox fork - make it a bit more like ryudo

add a highlight action
Dana Jansens danakj@orodu.net
commit

41010812fa1e891e162c88a3c962522832517cc4

parent

a6af2fc0b953894f80f37fec90ead9277a07b314

4 files changed, 26 insertions(+), 0 deletions(-)

jump to
M openbox/actions/all.copenbox/actions/all.c

@@ -41,4 +41,5 @@ action_layer_startup();

action_movetofromedge_startup(); action_growtoedge_startup(); action_if_startup(); + action_highlight_startup(); }
M openbox/actions/all.hopenbox/actions/all.h

@@ -42,5 +42,6 @@ void action_layer_startup();

void action_movetofromedge_startup(); void action_growtoedge_startup(); void action_if_startup(); +void action_highlight_startup(); #endif
M openbox/actions/focus.copenbox/actions/focus.c

@@ -45,10 +45,13 @@ {

Options *o = options; if (data->client) { +/* ob_debug("button %d focusable %d context %d %d %d\n", data->button, client_mouse_focusable(data->client), data->context, OB_FRAME_CONTEXT_CLIENT, OB_FRAME_CONTEXT_FRAME); +*/ + if (data->button == 0 || client_mouse_focusable(data->client) || (data->context != OB_FRAME_CONTEXT_CLIENT && data->context != OB_FRAME_CONTEXT_FRAME))
A openbox/actions/highlight.c

@@ -0,0 +1,21 @@

+#include "openbox/actions.h" +#include "openbox/client.h" + +static gboolean run_func(ObActionsData *data, gpointer options); + +void action_highlight_startup() +{ + actions_register("Highlight", + NULL, NULL, + run_func, + NULL, NULL); +} + +/* Always return FALSE because its not interactive */ +static gboolean run_func(ObActionsData *data, gpointer options) +{ + if (data->client) + client_hilite(data->client, TRUE); + + return FALSE; +}