]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus_cycle.c
If a window is added to the focus order while focus cycling, stop the focus cycling...
[chaz/openbox] / openbox / focus_cycle.c
index 20a738f43bc13d017f2a2f181d3306500f3c12f5..5849d7d699aa16a4476b62578f189c3da06d4a89 100644 (file)
@@ -56,12 +56,17 @@ void focus_cycle_stop(ObClient *ifclient)
     /* stop focus cycling if the given client is a valid focus target,
        and so the cycling is being disrupted */
     if (focus_cycle_target && ifclient &&
-        focus_valid_target(ifclient, TRUE,
-                           focus_cycle_iconic_windows,
-                           focus_cycle_all_desktops,
-                           focus_cycle_dock_windows,
-                           focus_cycle_desktop_windows,
-                           FALSE))
+        /* shortcut check, it is what we are pointing at right now */
+        (ifclient == focus_cycle_target ||
+         /* it's shown but it shouldn't be anymore */
+         focus_cycle_popup_is_showing(ifclient) ||
+         /* it's not shown but it should be */
+         focus_valid_target(ifclient, TRUE,
+                            focus_cycle_iconic_windows,
+                            focus_cycle_all_desktops,
+                            focus_cycle_dock_windows,
+                            focus_cycle_desktop_windows,
+                            FALSE)))
     {
         focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,TRUE);
         focus_directional_cycle(0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);
This page took 0.019806 seconds and 4 git commands to generate.