summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openbox/screen.c10
1 files changed, 10 insertions, 0 deletions
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);