]> Dogcows Code - chaz/openbox/blobdiff - openbox/screen.c
Merge branch 'backport' into work
[chaz/openbox] / openbox / screen.c
index 5074f18606c39e5684d6139250f6a09155cf07de..bb98e084cadd9017c55205fe81fa6792d0a19671 100644 (file)
@@ -30,6 +30,7 @@
 #include "frame.h"
 #include "event.h"
 #include "focus.h"
+#include "focus_cycle.h"
 #include "popup.h"
 #include "render/render.h"
 #include "gettext.h"
@@ -703,14 +704,21 @@ void screen_set_desktop(guint num, gboolean dofocus)
     for (it = g_list_last(stacking_list); it; it = g_list_previous(it)) {
         if (WINDOW_IS_CLIENT(it->data)) {
             ObClient *c = it->data;
-            if (client_hide(c) && c == focus_client) {
-                /* c was focused and we didn't do fallback clearly so make sure
-                   openbox doesnt still consider the window focused.
-                   this happens when using NextWindow with allDesktops, since
-                   it doesnt want to move focus on desktop change, but the
-                   focus is not going to stay with the current window, which
-                   has now disappeared */
-                focus_set_client(NULL);
+            if (client_hide(c)) {
+                /* in the middle of cycling..? kill it. */
+                focus_cycle_stop(c);
+
+                if (c == focus_client) {
+                    /* c was focused and we didn't do fallback clearly so make
+                       sure openbox doesnt still consider the window focused.
+                       this happens when using NextWindow with allDesktops,
+                       since it doesnt want to move focus on desktop change,
+                       but the focus is not going to stay with the current
+                       window, which has now disappeared.
+                       only do this if the client was actually hidden,
+                       otherwise it can keep focus. */
+                    focus_set_client(NULL);
+                }
             }
         }
     }
@@ -949,6 +957,8 @@ void screen_show_desktop_popup(guint d, gboolean perm)
                                   config_desktop_popup_time * 1000,
                                   hide_desktop_popup_func, desktop_popup,
                                   g_direct_equal, NULL);
+    if (perm)
+        desktop_popup_perm = TRUE;
 
     g_free(a);
 }
This page took 0.024494 seconds and 4 git commands to generate.