bottom'. */
focus_order_to_top(self);
+ /* Fall back focus since we're disappearing */
+ if (focus_client == self)
+ client_unfocus(self);
+
changed = TRUE;
}
} else {
return TRUE;
}
-/* Used when the current client is closed, focus_last will then prevent
- * focus from going to the mouse pointer */
+/* Used when the current client is closed or otherwise hidden, focus_last will
+ then prevent focus from going to the mouse pointer
+*/
void client_unfocus(ObClient *self)
{
if (focus_client == self) {
/* Look for the followup FocusIn */
if (!XCheckIfEvent(ob_display, &ce, look_for_focusin, NULL)) {
/* There is no FocusIn, move focus where we can still hear events*/
- focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);
+ focus_set_client(NULL);
} else if (ce.xany.window == e->xany.window) {
/* If focus didn't actually move anywhere, there is nothing to do*/
break;