Add "de" option to Iconify action that makes it deiconify windows (useful while alt...
authorMikael Magnusson <mikachu@comhem.se>
Mon, 23 Jul 2007 23:36:14 +0000 (01:36 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Thu, 28 Feb 2008 03:33:30 +0000 (04:33 +0100)
openbox/actions/iconify.c

index 6f14a2e070760efad8f29e280909059e73a2829a..54008601d01c40139b12bfe4acaf0fcf057b9081 100644 (file)
@@ -2,21 +2,31 @@
 #include "openbox/client.h"
 
 static gboolean run_func(ObActionsData *data, gpointer options);
+static gpointer setup_func(xmlNodePtr node);
 
 void action_iconify_startup(void)
 {
     actions_register("Iconify",
-                     NULL, NULL,
+                     setup_func,
+                     NULL,
                      run_func,
                      NULL, NULL);
 }
 
+static gpointer setup_func(xmlNodePtr node)
+{
+    xmlNodePtr n;
+
+    if ((n = obt_parse_find_node(node, "de")))
+        return GINT_TO_POINTER(obt_parse_node_bool(n));
+}
+
 /* 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);
+        client_iconify(data->client, !options, TRUE, FALSE);
         actions_client_move(data, FALSE);
     }