summaryrefslogtreecommitdiff
path: root/src/screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.cc')
-rw-r--r--src/screen.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/screen.cc b/src/screen.cc
index 75d8e87e..d242e887 100644
--- a/src/screen.cc
+++ b/src/screen.cc
@@ -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;