1 #include "openbox/action.h"
2 #include "openbox/action_list_run.h"
3 #include "openbox/client.h"
4 #include "openbox/screen.h"
6 static gboolean run_func_toggle(const ObActionListRun *data, gpointer options);
8 void action_omnipresent_startup(void)
10 action_register("ToggleOmnipresent", OB_ACTION_DEFAULT_FILTER_SINGLE,
11 NULL, NULL, run_func_toggle);
14 /* Always return FALSE because its not interactive */
15 static gboolean run_func_toggle(const ObActionListRun *data, gpointer options)
18 action_client_move(data, TRUE);
19 client_set_desktop(data->client,
20 data->client->desktop == DESKTOP_ALL ?
21 screen_desktop : DESKTOP_ALL, FALSE, TRUE);
22 action_client_move(data, FALSE);