From: Dana Jansens Date: Mon, 10 Feb 2003 17:01:32 +0000 (+0000) Subject: smarter focus restoring X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=ba9b0617ed0c68b0487fd5246fbcdc2156f65c08;p=chaz%2Fopenbox smarter focus restoring --- 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;