From cf478381b3e386dc0478403cf1a73b4d3ec6fa61 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 22 Jun 2007 14:35:51 +0000 Subject: add the iconify action --- openbox/actions/iconify.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 openbox/actions/iconify.c (limited to 'openbox/actions/iconify.c') diff --git a/openbox/actions/iconify.c b/openbox/actions/iconify.c new file mode 100644 index 00000000..b82684ea --- /dev/null +++ b/openbox/actions/iconify.c @@ -0,0 +1,24 @@ +#include "openbox/actions.h" +#include "openbox/client.h" + +static gboolean run_func(ObActionsData *data, gpointer options); + +void action_iconify_startup() +{ + actions_register("Iconify", + NULL, NULL, + run_func, + NULL, NULL); +} + +/* Always return FALSE because its not interactive */ +static gboolean run_func(ObActionsData *data, gpointer options) +{ + if (data->client) { + actions_client_move(data, TRUE); + client_iconify(data->client, TRUE, TRUE, FALSE); + actions_client_move(data, FALSE); + } + + return FALSE; +} -- cgit v1.2.3