diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-01-11 16:11:51 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-01-11 16:11:51 -0500 |
| commit | ea371936cec5f1e7f0eaed698b2cff6fab42f210 (patch) | |
| tree | 094b744c92ac2f11b2728dbc3c1af1a26e6f560d /openbox/actions/cyclewindows.c | |
| parent | 746015e88c51dda43b26f35abc25050c502d319b (diff) | |
let you raise the focus target temporarily during focus cycling, with the <raise> option. also a new <bar> option lets you turn off the indicator bar
Diffstat (limited to 'openbox/actions/cyclewindows.c')
| -rw-r--r-- | openbox/actions/cyclewindows.c | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/openbox/actions/cyclewindows.c b/openbox/actions/cyclewindows.c index 285df370..059db93f 100644 --- a/openbox/actions/cyclewindows.c +++ b/openbox/actions/cyclewindows.c @@ -1,4 +1,6 @@ #include "openbox/actions.h" +#include "openbox/stacking.h" +#include "openbox/window.h" #include "openbox/event.h" #include "openbox/focus_cycle.h" #include "openbox/openbox.h" @@ -11,6 +13,8 @@ typedef struct { gboolean desktop_windows; gboolean all_desktops; gboolean forward; + gboolean bar; + gboolean raise; GSList *actions; } Options; @@ -46,11 +50,16 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) o = g_new0(Options, 1); o->dialog = TRUE; + o->bar = TRUE; if ((n = parse_find_node("linear", node))) o->linear = parse_bool(doc, n); if ((n = parse_find_node("dialog", node))) o->dialog = parse_bool(doc, n); + if ((n = parse_find_node("bar", node))) + o->bar = parse_bool(doc, n); + if ((n = parse_find_node("raise", node))) + o->raise = parse_bool(doc, n); if ((n = parse_find_node("panels", node))) o->dock_windows = parse_bool(doc, n); if ((n = parse_find_node("desktop", node))) @@ -111,17 +120,22 @@ static void free_func(gpointer options) static gboolean run_func(ObActionsData *data, gpointer options) { Options *o = options; + struct _ObClient *ft; - focus_cycle(o->forward, - o->all_desktops, - o->dock_windows, - o->desktop_windows, - o->linear, - TRUE, - o->dialog, - FALSE, FALSE); + ft = focus_cycle(o->forward, + o->all_desktops, + o->dock_windows, + o->desktop_windows, + o->linear, + TRUE, + o->bar, + o->dialog, + FALSE, FALSE); cycling = TRUE; + stacking_restore(); + if (o->raise) stacking_temp_raise(CLIENT_AS_WINDOW(ft)); + return TRUE; } @@ -174,6 +188,7 @@ static void end_cycle(gboolean cancel, guint state, Options *o) o->desktop_windows, o->linear, TRUE, + o->bar, o->dialog, TRUE, cancel); cycling = FALSE; @@ -181,4 +196,6 @@ static void end_cycle(gboolean cancel, guint state, Options *o) if (ft) actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY, state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft); + + stacking_restore(); } |
