all repos — openbox @ cf478381b3e386dc0478403cf1a73b4d3ec6fa61

openbox fork - make it a bit more like ryudo

add the iconify action
Dana Jansens danakj@orodu.net
commit

cf478381b3e386dc0478403cf1a73b4d3ec6fa61

parent

b0fa629769ef17cae28f137aad80f8c4798f7592

5 files changed, 27 insertions(+), 7 deletions(-)

jump to
M Makefile.amMakefile.am

@@ -163,6 +163,7 @@ openbox/actions/debug.c \

openbox/actions/execute.c \ openbox/actions/exit.c \ openbox/actions/focus.c \ + openbox/actions/iconify.c \ openbox/actions/lower.c \ openbox/actions/move.c \ openbox/actions/raise.c \
M openbox/action.copenbox/action.c

@@ -1010,13 +1010,6 @@

action_run(l, c, 0, time); } -void action_iconify(union ActionData *data) -{ - client_action_start(data); - client_iconify(data->client.any.c, TRUE, TRUE, FALSE); - client_action_end(data, config_focus_under_mouse); -} - void action_unshaderaise(union ActionData *data) { if (data->client.any.c->shaded)
M openbox/actions/all.copenbox/actions/all.c

@@ -18,4 +18,5 @@ action_raise_startup();

action_lower_startup(); action_raiselower_startup(); action_unfocus_startup(); + action_iconify_startup(); }
M openbox/actions/all.hopenbox/actions/all.h

@@ -19,5 +19,6 @@ void action_raise_startup();

void action_lower_startup(); void action_raiselower_startup(); void action_unfocus_startup(); +void action_iconify_startup(); #endif
A openbox/actions/iconify.c

@@ -0,0 +1,24 @@

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