Make the Focus action stop all interactive actions (Fixes bug #4436)
[mikachu/openbox.git] / openbox / focus_cycle.c
index 8d04749..c92b5a5 100644 (file)
@@ -55,9 +55,10 @@ 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 &&
-        (ifclient == focus_cycle_target ||
-         focus_cycle_popup_is_showing(ifclient)))
+    if (focus_cycle_target &&
+        ((ifclient && (ifclient == focus_cycle_target ||
+                       focus_cycle_popup_is_showing(ifclient))) ||
+         !ifclient))
     {
         focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,TRUE);
         focus_directional_cycle(0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);