1 #include "openbox/actions.h"
2 #include "openbox/client.h"
4 static gboolean run_func_on(ObActionsData *data, gpointer options);
5 static gboolean run_func_off(ObActionsData *data, gpointer options);
6 static gboolean run_func_toggle(ObActionsData *data, gpointer options);
8 void action_decorations_startup()
10 actions_register("Decorate", NULL, NULL, run_func_on, NULL, NULL);
11 actions_register("Undecorate", NULL, NULL, run_func_off, NULL, NULL);
12 actions_register("ToggleDecorations", NULL, NULL, run_func_toggle,
16 /* Always return FALSE because its not interactive */
17 static gboolean run_func_on(ObActionsData *data, gpointer options)
20 actions_client_move(data, TRUE);
21 client_set_undecorated(data->client, FALSE);
22 actions_client_move(data, FALSE);
27 /* Always return FALSE because its not interactive */
28 static gboolean run_func_off(ObActionsData *data, gpointer options)
31 actions_client_move(data, TRUE);
32 client_set_undecorated(data->client, TRUE);
33 actions_client_move(data, FALSE);
38 /* Always return FALSE because its not interactive */
39 static gboolean run_func_toggle(ObActionsData *data, gpointer options)
42 actions_client_move(data, TRUE);
43 client_set_undecorated(data->client, !data->client->undecorated);
44 actions_client_move(data, FALSE);