Hide the focus popup if we change desktops and one of the windows in it disappears
[mikachu/openbox.git] / openbox / focus_cycle.c
index 20a738f..8d04749 100644 (file)
@@ -56,12 +56,8 @@ 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))
+        (ifclient == focus_cycle_target ||
+         focus_cycle_popup_is_showing(ifclient)))
     {
         focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,TRUE);
         focus_directional_cycle(0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);