From ca28e08c2f47dec4e30f54c3ef64376a6246fbf9 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 23 Jun 2007 14:44:58 +0000 Subject: add dockautohide action --- openbox/actions/all.c | 1 + openbox/actions/all.h | 1 + openbox/actions/dockautohide.c | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 openbox/actions/dockautohide.c (limited to 'openbox/actions') 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; +} -- cgit v1.2.3