]> icculus.org git repositories - dana/openbox.git/blob - openbox/actions/raise.c
Use ObConfigValue to parse gravity coords, remove parse special functions from config...
[dana/openbox.git] / openbox / actions / raise.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
7 static gboolean run_func(const ObClientSet *set,
8                          const ObActionListRun *data, gpointer options);
9
10 void action_raise_startup(void)
11 {
12     action_register("Raise", OB_ACTION_DEFAULT_FILTER_SINGLE,
13                     NULL, NULL, run_func);
14 }
15
16 static gboolean each_run(struct _ObClient *c, const ObActionListRun *data,
17                          gpointer options)
18 {
19     stacking_raise(CLIENT_AS_WINDOW(c));
20     return TRUE;
21 }
22
23 /* Always return FALSE because its not interactive */
24 static gboolean run_func(const ObClientSet *set,
25                          const ObActionListRun *data, gpointer options)
26 {
27     if (!client_set_is_empty(set)) {
28         action_client_move(data, TRUE);
29         client_set_run(set, data, each_run, options);
30         action_client_move(data, FALSE);
31     }
32
33     return FALSE;
34 }