Make it possible for an action name to choose whether it is interactive or not based...
[dana/openbox.git] / openbox / actions / iconify.c
1 #include "openbox/actions.h"
2 #include "openbox/client.h"
3
4 static gboolean run_func(ObActionsData *data, gpointer options);
5
6 void action_iconify_startup(void)
7 {
8     actions_register("Iconify",
9                      NULL, NULL,
10                      run_func);
11 }
12
13 /* Always return FALSE because its not interactive */
14 static gboolean run_func(ObActionsData *data, gpointer options)
15 {
16     if (data->client) {
17         actions_client_move(data, TRUE);
18         client_iconify(data->client, TRUE, TRUE, FALSE);
19         actions_client_move(data, FALSE);
20     }
21
22     return FALSE;
23 }