]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions/dock.c
Make the dock a context and add actions LowerDock and RaiseDock
[chaz/openbox] / openbox / actions / dock.c
diff --git a/openbox/actions/dock.c b/openbox/actions/dock.c
new file mode 100644 (file)
index 0000000..a1f6837
--- /dev/null
@@ -0,0 +1,38 @@
+#include "openbox/actions.h"
+#include "openbox/stacking.h"
+#include "openbox/window.h"
+#include "openbox/dock.h"
+
+static gboolean raise_func(ObActionsData *data, gpointer options);
+static gboolean lower_func(ObActionsData *data, gpointer options);
+
+void action_dock_startup(void)
+{
+    actions_register("RaiseDock",
+                     NULL, NULL,
+                     raise_func);
+    actions_register("LowerDock",
+                     NULL, NULL,
+                     lower_func);
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean raise_func(ObActionsData *data, gpointer options)
+{
+    actions_client_move(data, TRUE);
+    dock_raise_dock();
+    actions_client_move(data, FALSE);
+
+    return FALSE;
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean lower_func(ObActionsData *data, gpointer options)
+{
+    actions_client_move(data, TRUE);
+    dock_lower_dock();
+    actions_client_move(data, FALSE);
+
+    return FALSE;
+}
+
This page took 0.022562 seconds and 4 git commands to generate.