]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions/showdesktop.c
add the showdesktop action
[chaz/openbox] / openbox / actions / showdesktop.c
diff --git a/openbox/actions/showdesktop.c b/openbox/actions/showdesktop.c
new file mode 100644 (file)
index 0000000..2699b1b
--- /dev/null
@@ -0,0 +1,21 @@
+#include "openbox/actions.h"
+#include "openbox/screen.h"
+
+static gboolean run_func(ObActionsData *data, gpointer options);
+
+void action_showdesktop_startup()
+{
+    actions_register("ShowDesktop",
+                     NULL,
+                     NULL,
+                     run_func,
+                     NULL, NULL);
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean run_func(ObActionsData *data, gpointer options)
+{
+    screen_show_desktop(!screen_showing_desktop, NULL);
+
+    return FALSE;
+}
This page took 0.021026 seconds and 4 git commands to generate.