all repos — openbox @ 1eb727064a4ad19c89b55d08d68e8d4b85c0b1d7

openbox fork - make it a bit more like ryudo

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

1eb727064a4ad19c89b55d08d68e8d4b85c0b1d7

parent

cf478381b3e386dc0478403cf1a73b4d3ec6fa61

5 files changed, 27 insertions(+), 12 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/fullscreen.c \ openbox/actions/iconify.c \ openbox/actions/lower.c \ openbox/actions/move.c \
M openbox/action.copenbox/action.c

@@ -570,11 +570,6 @@ action_toggle_maximize_vert,

setup_client_action }, { - "togglefullscreen", - action_toggle_fullscreen, - setup_client_action - }, - { "sendtodesktop", action_send_to_desktop, setup_action_send_to_desktop

@@ -1212,13 +1207,6 @@ {

client_action_start(data); client_maximize(data->client.any.c, !data->client.any.c->max_vert, 2); - client_action_end(data, config_focus_under_mouse); -} - -void action_toggle_fullscreen(union ActionData *data) -{ - client_action_start(data); - client_fullscreen(data->client.any.c, !(data->client.any.c->fullscreen)); client_action_end(data, config_focus_under_mouse); }
M openbox/actions/all.copenbox/actions/all.c

@@ -19,4 +19,5 @@ action_lower_startup();

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

@@ -20,5 +20,6 @@ void action_lower_startup();

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

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

+#include "openbox/actions.h" +#include "openbox/client.h" + +static gboolean run_func(ObActionsData *data, gpointer options); + +void action_fullscreen_startup() +{ + actions_register("Fullscreen", + 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_fullscreen(data->client, !data->client->fullscreen); + actions_client_move(data, FALSE); + } + + return FALSE; +}