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