summaryrefslogtreecommitdiff
path: root/openbox/actions
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-06-23 14:44:58 +0000
committerDana Jansens <danakj@orodu.net>2007-06-23 14:44:58 +0000
commitca28e08c2f47dec4e30f54c3ef64376a6246fbf9 (patch)
treead9874aac0be99b2059c82fde6113a6cb98c6a68 /openbox/actions
parentb963ed3a92ac0c8980618531fccdaf81613595b3 (diff)
add dockautohide action
Diffstat (limited to 'openbox/actions')
-rw-r--r--openbox/actions/all.c1
-rw-r--r--openbox/actions/all.h1
-rw-r--r--openbox/actions/dockautohide.c22
3 files changed, 24 insertions, 0 deletions
diff --git a/openbox/actions/all.c b/openbox/actions/all.c
index 4e351817..ea81882b 100644
--- a/openbox/actions/all.c
+++ b/openbox/actions/all.c
@@ -36,4 +36,5 @@ void action_all_startup()
action_directionaldesktop_startup();
action_resizerelative_startup();
action_addremovedesktop_startup();
+ action_dockautohide_startup();
}
diff --git a/openbox/actions/all.h b/openbox/actions/all.h
index 2919463b..6c7b60d9 100644
--- a/openbox/actions/all.h
+++ b/openbox/actions/all.h
@@ -37,5 +37,6 @@ void action_desktop_startup();
void action_directionaldesktop_startup();
void action_resizerelative_startup();
void action_addremovedesktop_startup();
+void action_dockautohide_startup();
#endif
diff --git a/openbox/actions/dockautohide.c b/openbox/actions/dockautohide.c
new file mode 100644
index 00000000..e7f65055
--- /dev/null
+++ b/openbox/actions/dockautohide.c
@@ -0,0 +1,22 @@
+#include "openbox/actions.h"
+#include "openbox/dock.h"
+#include "openbox/config.h"
+
+static gboolean run_func(ObActionsData *data, gpointer options);
+
+void action_dockautohide_startup()
+{
+ actions_register("DockAutoHide",
+ NULL, NULL,
+ run_func,
+ NULL, NULL);
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean run_func(ObActionsData *data, gpointer options)
+{
+ config_dock_hide = !config_dock_hide;
+ dock_configure();
+
+ return FALSE;
+}