dummy child of all mikabox branches at 3.4.7
[mikachu/openbox.git] /
1 #include "openbox/actions.h"
2 #include "openbox/client.h"
3 #include "openbox/screen.h"
4
5 static gboolean run_func_toggle(ObActionsData *data, gpointer options);
6
7 void action_omnipresent_startup(void)
8 {
9     actions_register("ToggleOmnipresent", NULL, NULL, run_func_toggle,
10                      NULL, NULL);
11 }
12
13 /* Always return FALSE because its not interactive */
14 static gboolean run_func_toggle(ObActionsData *data, gpointer options)
15 {
16     if (data->client) {
17         actions_client_move(data, TRUE);
18         client_set_desktop(data->client,
19                            data->client->desktop == DESKTOP_ALL ?
20                            screen_desktop : DESKTOP_ALL, FALSE, TRUE);
21         actions_client_move(data, FALSE);
22     }
23     return FALSE;
24 }