From: Dana Jansens Date: Thu, 17 Apr 2003 17:32:09 +0000 (+0000) Subject: distribute focus when entering/leaving show-the-desktop mode X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=322b2d0a05daf0c0c9de07baf5e27e4945f7bfd5;p=chaz%2Fopenbox distribute focus when entering/leaving show-the-desktop mode --- diff --git a/openbox/screen.c b/openbox/screen.c index 118798e8..72363cdc 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -424,6 +424,16 @@ void screen_show_desktop(gboolean show) } } + if (show) { + /* focus desktop */ + for (it = focus_order[screen_desktop]; it; it = it->next) + if (((Client*)it->data)->type == Type_Desktop && + client_focus(it->data)) + break; + } else { + focus_fallback(Fallback_NoFocus); + } + show = !!show; /* make it boolean */ PROP_SET32(ob_root, net_showing_desktop, cardinal, show);