smarter focus restoring

This commit is contained in:
Dana Jansens 2003-02-10 17:01:32 +00:00
parent 5d47526b30
commit ba9b0617ed

View file

@ -890,8 +890,11 @@ void Screen::showDesktop(bool show)
Client *c = openbox->focusedClient(); Client *c = openbox->focusedClient();
if (c) saved_focus = c->window(); if (c) saved_focus = c->window();
} else { } else {
Client *c = openbox->findClient(saved_focus); Client *f = openbox->focusedClient();
if (c) c->focus(); if (!f || f->type() == Client::Type_Desktop) {
Client *c = openbox->findClient(saved_focus);
if (c) c->focus();
}
} }
_showing_desktop = show; _showing_desktop = show;