1 #include "openbox/action.h"
2 #include "openbox/client.h"
4 static gboolean run_func_on(ObActionData *data, gpointer options);
5 static gboolean run_func_off(ObActionData *data, gpointer options);
6 static gboolean run_func_toggle(ObActionData *data, gpointer options);
8 void action_decorations_startup(void)
10 action_register("Decorate", NULL, NULL, run_func_on);
11 action_register("Undecorate", NULL, NULL, run_func_off);
12 action_register("ToggleDecorations", NULL, NULL, run_func_toggle);
15 /* Always return FALSE because its not interactive */
16 static gboolean run_func_on(ObActionData *data, gpointer options)
19 action_client_move(data, TRUE);
20 client_set_undecorated(data->client, FALSE);
21 action_client_move(data, FALSE);
26 /* Always return FALSE because its not interactive */
27 static gboolean run_func_off(ObActionData *data, gpointer options)
30 action_client_move(data, TRUE);
31 client_set_undecorated(data->client, TRUE);
32 action_client_move(data, FALSE);
37 /* Always return FALSE because its not interactive */
38 static gboolean run_func_toggle(ObActionData *data, gpointer options)
41 action_client_move(data, TRUE);
42 client_set_undecorated(data->client, !data->client->undecorated);
43 action_client_move(data, FALSE);