From 220e568d75eaad436be403cd66d4e47d31d42392 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 10 Jun 2007 17:58:52 +0000 Subject: allow noninteractive directional focus. make keybinds noninteractive when the last key in the chain has no modifiers (i think this is what the code was supposed to do but failed.) don't reset key chains during an interactive action. reset them after an interactive action finishes (honoring chroot) so you can Stuff and it'll do stuff as you hit C-Up, you dont have to keep hitting C-t --- openbox/focus_cycle.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'openbox/focus_cycle.c') diff --git a/openbox/focus_cycle.c b/openbox/focus_cycle.c index ca299c67..f8ba8285 100644 --- a/openbox/focus_cycle.c +++ b/openbox/focus_cycle.c @@ -358,13 +358,13 @@ void focus_directional_cycle(ObDirection dir, gboolean dock_windows, static ObClient *first = NULL; ObClient *ft = NULL; - if (!interactive) - return; + g_print("interactive %d dialog %d done %d cancel %d\n", + interactive, dialog, done, cancel); if (cancel) { focus_cycle_target = NULL; goto done_cycle; - } else if (done) + } else if (done && interactive) goto done_cycle; if (!focus_order) @@ -396,11 +396,11 @@ void focus_directional_cycle(ObDirection dir, gboolean dock_windows, ft = it->data; } - if (ft) { - if (ft != focus_cycle_target) {/* prevents flicker */ - focus_cycle_target = ft; - focus_cycle_draw_indicator(ft); - } + if (ft && ft != focus_cycle_target) {/* prevents flicker */ + focus_cycle_target = ft; + if (!interactive) + goto done_cycle; + focus_cycle_draw_indicator(ft); } if (focus_cycle_target && dialog) /* same arguments as focus_target_valid */ -- cgit v1.2.3