if (XCheckTypedEvent(ob_display, FocusIn, &fi)) {
event_process(&fi);
- if (fi.xfocus.window == e->xfocus.window)
- return;
/* secret magic way of event_process telling us that no client
was found for the FocusIn event */
- if (fi.xfocus.window == None)
+ if (fi.xfocus.window != None)
focus_fallback(FALSE);
+ if (fi.xfocus.window == e->xfocus.window)
+ return;
} else
focus_fallback(FALSE);
}
event_handle_root(e);
else if (e->type == MapRequest)
client_manage(window);
- else if (e->type == FocusIn)
- e->xfocus.window = None; /* says no client was found for the event */
else if (e->type == ConfigureRequest) {
/* unhandled configure requests must be used to configure the
window directly */
/* focus state can affect the stacking layer */
client_calc_layer(client);
engine_frame_adjust_focus(client->frame);
+
+ e->xfocus.window = None; /* says a client was found for the event! */
break;
case EnterNotify:
if (client_normal(client)) {