]> icculus.org git repositories - mikachu/openbox.git/blob - openbox/actions/lock.c
Merge branch 'work' into wip/mikabox
[mikachu/openbox.git] / openbox / actions / lock.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_lock_startup(void)
7 {
8     actions_register("Lock", NULL, NULL, run_func,
9                      NULL, NULL);
10 }
11
12 /* Always return FALSE because its not interactive */
13 static gboolean run_func(ObActionsData *data, gpointer options)
14 {
15     if (data->client)
16         client_set_locked(data->client, !data->client->locked);
17
18     return FALSE;
19 }