]> icculus.org git repositories - dana/openbox.git/blob - openbox/actions/fullscreen.c
Rename the fields in ObActionListRun for clarity
[dana/openbox.git] / openbox / actions / fullscreen.c
1 #include "openbox/action.h"
2 #include "openbox/action_list_run.h"
3 #include "openbox/client.h"
4
5 static gboolean run_func_toggle(const ObActionListRun *data, gpointer options);
6
7 void action_fullscreen_startup(void)
8 {
9     action_register("ToggleFullscreen", OB_ACTION_DEFAULT_FILTER_SINGLE,
10                     NULL, NULL, run_func_toggle);
11 }
12
13 /* Always return FALSE because its not interactive */
14 static gboolean run_func_toggle(const ObActionListRun *data, gpointer options)
15 {
16     if (data->target) {
17         action_client_move(data, TRUE);
18         client_fullscreen(data->target, !data->target->fullscreen);
19         action_client_move(data, FALSE);
20     }
21     return FALSE;
22 }