so back it is. if problems arise again, then try filtering on the
detail instead of the mode. */
if (e->xcrossing.mode != NotifyNormal) return;
+ g_print("%s\n", e->type == EnterNotify ? "EnterNotify":"LeaveNotify");
break;
}
switch (e->type) {
case FocusIn:
- client->focused = TRUE;
- engine_frame_adjust_focus(client->frame);
+ if (focus_client != client)
+ focus_set_client(client);
/* focus state can affect the stacking layer */
client_calc_layer(client);
- if (focus_client != client)
- focus_set_client(client);
+ engine_frame_adjust_focus(client->frame);
break;
case FocusOut:
- client->focused = FALSE;
- engine_frame_adjust_focus(client->frame);
+ if (focus_client == client)
+ focus_set_client(NULL);
/* focus state can affect the stacking layer */
client_calc_layer(client);
- if (focus_client == client)
- focus_set_client(NULL);
+ engine_frame_adjust_focus(client->frame);
break;
case ConfigureRequest:
g_message("ConfigureRequest for window %lx", client->window);