e->xfocus.window, e->xfocus.mode, e->xfocus.detail);
#endif
- /* Try process a FocusIn first, and if a legit one isn't found, then
- do the fallback shiznit. */
{
XEvent fe;
gboolean fallback = TRUE;
while (TRUE) {
- if (!XCheckTypedEvent(ob_display, FocusOut, &fe))
+ if (!XCheckTypedWindowEvent(ob_display, FocusOut,
+ e->xfocus.window,&fe))
if (!XCheckTypedEvent(ob_display, FocusIn, &fe))
break;
if (fe.type == FocusOut) {
#endif
/* focus state can affect the stacking layer */
client_calc_layer(client);
- frame_adjust_focus(client->frame);
+ frame_adjust_focus(client->frame, e->type == FocusIn);
break;
case EnterNotify:
if (client_normal(client)) {