]> icculus.org git repositories - dana/openbox.git/blob - openbox/actions/dock.c
Add action_list_run.c/h with action_list_run() and struct ObActionListRun.
[dana/openbox.git] / openbox / actions / dock.c
1 #include "openbox/action.h"
2 #include "openbox/action_list_run.h"
3 #include "openbox/stacking.h"
4 #include "openbox/window.h"
5 #include "openbox/dock.h"
6
7 static gboolean raise_func(const ObActionListRun *data, gpointer options);
8 static gboolean lower_func(const ObActionListRun *data, gpointer options);
9
10 void action_dock_startup(void)
11 {
12     action_register("RaiseDock", OB_ACTION_DEFAULT_FILTER_EMPTY,
13                     NULL, NULL, raise_func);
14     action_register("LowerDock", OB_ACTION_DEFAULT_FILTER_EMPTY,
15                     NULL, NULL, lower_func);
16 }
17
18 /* Always return FALSE because its not interactive */
19 static gboolean raise_func(const ObActionListRun *data, gpointer options)
20 {
21     action_client_move(data, TRUE);
22     dock_raise_dock();
23     action_client_move(data, FALSE);
24
25     return FALSE;
26 }
27
28 /* Always return FALSE because its not interactive */
29 static gboolean lower_func(const ObActionListRun *data, gpointer options)
30 {
31     action_client_move(data, TRUE);
32     dock_lower_dock();
33     action_client_move(data, FALSE);
34
35     return FALSE;
36 }
37