void focus_fallback(gboolean allow_refocus)
{
ObClient *new;
+ ObClient *old = focus_client;
/* unfocus any focused clients.. they can be focused by Pointer events
and such, and then when I try focus them, I won't get a FocusIn event
*/
focus_nothing();
- if ((new = focus_fallback_target(allow_refocus, focus_client)))
+ if ((new = focus_fallback_target(allow_refocus, old)))
client_focus(new);
}
screen_install_colormap(NULL, TRUE);
}
+ focus_client = NULL;
+
/* when nothing will be focused, send focus to the backup target */
XSetInputFocus(ob_display, screen_support_win, RevertToPointerRoot,
event_curtime);