]> icculus.org git repositories - dana/openbox.git/blob - openbox/actions/iconify.c
Use ObConfigValue to parse gravity coords, remove parse special functions from config...
[dana/openbox.git] / openbox / actions / iconify.c
1 #include "openbox/action.h"
2 #include "openbox/action_list_run.h"
3 #include "openbox/client.h"
4 #include "openbox/client_set.h"
5
6 static gboolean run_func(const ObClientSet *set,
7                          const ObActionListRun *data, gpointer options);
8
9 void action_iconify_startup(void)
10 {
11     action_register("Iconify", OB_ACTION_DEFAULT_FILTER_SINGLE,
12                     NULL, NULL, run_func);
13 }
14
15 static gboolean each_run(ObClient *c, const ObActionListRun *data,
16                          gpointer options)
17 {
18     client_iconify(c, TRUE, TRUE, FALSE);
19     return TRUE;
20 }
21
22 /* Always return FALSE because its not interactive */
23 static gboolean run_func(const ObClientSet *set,
24                          const ObActionListRun *data, gpointer options)
25 {
26     if (!client_set_is_empty(set)) {
27         action_client_move(data, TRUE);
28         client_set_run(set, data, each_run, options);
29         action_client_move(data, FALSE);
30     }
31     return FALSE;
32 }