]> Dogcows Code - chaz/openbox/commitdiff
don't fallback to the desktop again when leaving show-desktop-mode
authorDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 04:42:33 +0000 (04:42 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 04:42:33 +0000 (04:42 +0000)
openbox/screen.c

index 5f0ef0e7f3faa6b10bfa87bf948b813c15fea9fc..d5d61f507e643feaaf146fdb985aeaf2ff1b54fb 100644 (file)
@@ -887,7 +887,21 @@ void screen_show_desktop(gboolean show)
                 break;
         }
     } else {
-        focus_fallback(TRUE);
+        /* use NULL for the "old" argument because the desktop was focused
+           and we don't want to fallback to the desktop by default */
+        focus_hilite = focus_fallback_target(TRUE, NULL);
+        if (focus_hilite) {
+            frame_adjust_focus(focus_hilite->frame, TRUE);
+
+            /*!
+              When this focus_client check is not used, you can end up with
+              races, as demonstrated with gnome-panel, sometimes the window
+              you click on another desktop ends up losing focus cuz of the
+              focus change here.
+            */
+            /*if (!focus_client)*/
+            client_focus(focus_hilite);
+        }
     }
 
     show = !!show; /* make it boolean */
This page took 0.023709 seconds and 4 git commands to generate.