event_lasttime = e->xcrossing.time;
/* NotifyUngrab occurs when a mouse button is released and the event is
caused, like when lowering a window */
- if (e->xcrossing.mode == NotifyGrab) return;
+ if (e->xcrossing.mode == NotifyGrab ||
+ e->xcrossing.detail == NotifyInferior)
+ return;
break;
default:
event_lasttime = CurrentTime;
case FocusIn:
focus_set_client(client);
case FocusOut:
+#ifdef DEBUG_FOCUS
g_message("Focus%s on client for %lx", (e->type==FocusIn?"In":"Out"),
client->window);
+#endif
/* focus state can affect the stacking layer */
client_calc_layer(client);
engine_frame_adjust_focus(client->frame);
client);
focus_order[desktop] = g_list_prepend(focus_order[desktop],
client);
- } else if (focus_follow)
+ } else if (focus_follow) {
+#ifdef DEBUG_FOCUS
+ g_message("EnterNotify on %lx, focusing window",
+ client->window);
+#endif
client_focus(client);
+ }
}
break;
case ConfigureRequest: