summaryrefslogtreecommitdiff
path: root/openbox/actions
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2010-06-26 15:55:40 +0200
committerMikael Magnusson <mikachu@gmail.com>2010-09-16 17:24:11 +0200
commit1ffc0021325e30db7bb7f8b2a17ca7f5546b3324 (patch)
treebbbb0794f66b06f3c10b914160be2d6e240fc2f9 /openbox/actions
parent48d36cd587e70b9680f65811d08038496a9ccc12 (diff)
Make the dock a context and add actions LowerDock and RaiseDock
Diffstat (limited to 'openbox/actions')
-rw-r--r--openbox/actions/all.c1
-rw-r--r--openbox/actions/all.h1
-rw-r--r--openbox/actions/dock.c38
3 files changed, 40 insertions, 0 deletions
diff --git a/openbox/actions/all.c b/openbox/actions/all.c
index 4563e65f..332e79ca 100644
--- a/openbox/actions/all.c
+++ b/openbox/actions/all.c
@@ -30,6 +30,7 @@ void action_all_startup(void)
action_resize_startup();
action_decorations_startup();
action_desktop_startup();
+ action_dock_startup();
action_resizerelative_startup();
action_addremovedesktop_startup();
action_dockautohide_startup();
diff --git a/openbox/actions/all.h b/openbox/actions/all.h
index 6acbc9ca..54d63195 100644
--- a/openbox/actions/all.h
+++ b/openbox/actions/all.h
@@ -31,6 +31,7 @@ void action_directionalwindows_startup(void);
void action_resize_startup(void);
void action_decorations_startup(void);
void action_desktop_startup(void);
+void action_dock_startup(void);
void action_resizerelative_startup(void);
void action_addremovedesktop_startup(void);
void action_dockautohide_startup(void);
diff --git a/openbox/actions/dock.c b/openbox/actions/dock.c
new file mode 100644
index 00000000..a1f68373
--- /dev/null
+++ b/openbox/actions/dock.c
@@ -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;
+}
+