]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions/iconify.c
add the iconify action
[chaz/openbox] / openbox / actions / iconify.c
diff --git a/openbox/actions/iconify.c b/openbox/actions/iconify.c
new file mode 100644 (file)
index 0000000..b82684e
--- /dev/null
@@ -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;
+}
This page took 0.023424 seconds and 4 git commands to generate.