]> Dogcows Code - chaz/openbox/commitdiff
smarter focus restoring
authorDana Jansens <danakj@orodu.net>
Mon, 10 Feb 2003 17:01:32 +0000 (17:01 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 10 Feb 2003 17:01:32 +0000 (17:01 +0000)
src/screen.cc

index 75d8e87ea06daf323a4bcc01f876a5fe484ea7a1..d242e8876173a7444297301a58a0fa8faab03488 100644 (file)
@@ -890,8 +890,11 @@ void Screen::showDesktop(bool show)
     Client *c = openbox->focusedClient();
     if (c) saved_focus = c->window();
   } else {
-    Client *c = openbox->findClient(saved_focus);
-    if (c) c->focus();
+    Client *f = openbox->focusedClient();
+    if (!f || f->type() == Client::Type_Desktop) {
+      Client *c = openbox->findClient(saved_focus);
+      if (c) c->focus();
+    }
   }
   
   _showing_desktop = show;
This page took 0.027617 seconds and 4 git commands to generate.