From bb0fd965c50289c02619113f113927294fa5be23 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 22 Jun 2007 05:02:25 +0000 Subject: add breakchroot action --- openbox/actions/activate.c | 4 ---- openbox/actions/all.c | 1 + openbox/actions/all.h | 1 + openbox/actions/breakchroot.c | 21 +++++++++++++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 openbox/actions/breakchroot.c (limited to 'openbox/actions') diff --git a/openbox/actions/activate.c b/openbox/actions/activate.c index 66923622..a431bafd 100644 --- a/openbox/actions/activate.c +++ b/openbox/actions/activate.c @@ -62,10 +62,6 @@ static gboolean run_func(ObActionsData *data, gpointer options) data->context != OB_FRAME_CONTEXT_CLIENT || data->context != OB_FRAME_CONTEXT_FRAME) { - /* if using focus_delay, stop the timer now so that focus doesn't - go moving on us */ - event_halt_focus_delay(); - client_activate(data->client, o->here, o->raise, o->unshade, TRUE); } } else { diff --git a/openbox/actions/all.c b/openbox/actions/all.c index a8cf305f..e3ad2b15 100644 --- a/openbox/actions/all.c +++ b/openbox/actions/all.c @@ -11,4 +11,5 @@ void action_all_startup() action_restart_startup(); action_cyclewindows_startup(); action_activate_startup(); + action_breakchroot_startup(); } diff --git a/openbox/actions/all.h b/openbox/actions/all.h index 1f9a7f38..5db2e55d 100644 --- a/openbox/actions/all.h +++ b/openbox/actions/all.h @@ -12,5 +12,6 @@ void action_exit_startup(); void action_restart_startup(); void action_cyclewindows_startup(); void action_activate_startup(); +void action_breakchroot_startup(); #endif diff --git a/openbox/actions/breakchroot.c b/openbox/actions/breakchroot.c new file mode 100644 index 00000000..bfdbf16c --- /dev/null +++ b/openbox/actions/breakchroot.c @@ -0,0 +1,21 @@ +#include "openbox/actions.h" +#include "openbox/keyboard.h" + +static gboolean run_func(ObActionsData *data, gpointer options); + +void action_breakchroot_startup() +{ + actions_register("BreakChroot", + NULL, NULL, + run_func, + NULL, NULL); +} + +/* Always return FALSE because its not interactive */ +static gboolean run_func(ObActionsData *data, gpointer options) +{ + /* break out of one chroot */ + keyboard_reset_chains(1); + + return FALSE; +} -- cgit v1.2.3