From fbc7607fbd1a380428a53094e727ac7631871bd4 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 22 Jun 2007 04:37:33 +0000 Subject: add the cyclewindows action --- openbox/focus_cycle.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'openbox/focus_cycle.c') diff --git a/openbox/focus_cycle.c b/openbox/focus_cycle.c index a5ac4e68..971f116f 100644 --- a/openbox/focus_cycle.c +++ b/openbox/focus_cycle.c @@ -67,15 +67,16 @@ void focus_cycle_stop(ObClient *ifclient) } } -void focus_cycle(gboolean forward, gboolean all_desktops, - gboolean dock_windows, gboolean desktop_windows, - gboolean linear, gboolean interactive, - gboolean dialog, gboolean done, gboolean cancel) +ObClient* focus_cycle(gboolean forward, gboolean all_desktops, + gboolean dock_windows, gboolean desktop_windows, + gboolean linear, gboolean interactive, + gboolean dialog, gboolean done, gboolean cancel) { static ObClient *t = NULL; static GList *order = NULL; GList *it, *start, *list; ObClient *ft = NULL; + ObClient *ret = NULL; if (interactive) { if (cancel) { @@ -146,8 +147,7 @@ void focus_cycle(gboolean forward, gboolean all_desktops, } while (it != start); done_cycle: - if (done && focus_cycle_target) - client_activate(focus_cycle_target, FALSE, TRUE); + if (done && !cancel) ret = focus_cycle_target; t = NULL; focus_cycle_target = NULL; @@ -159,7 +159,7 @@ done_cycle: focus_cycle_popup_hide(); } - return; + return ret; } /* this be mostly ripped from fvwm */ -- cgit v1.2.3