/* focus the last focused window on the desktop, and ignore enter events
from the switch so it doesnt mess with the focus */
- XSync(ob_display, FALSE);
while (XCheckTypedEvent(ob_display, EnterNotify, &e));
focus_fallback(Fallback_Desktop);
}
}
+ 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);