more focus cleanups. ignored focusin's were not working right recursively.
also, when the focusin coming later is not for a valid window the fallback would not be called. both fixed.
This commit is contained in:
parent
21442ab6e4
commit
32808b53a5
1 changed files with 5 additions and 5 deletions
|
@ -243,12 +243,12 @@ void event_process(XEvent *e)
|
||||||
if (XCheckTypedEvent(ob_display, FocusIn, &fi)) {
|
if (XCheckTypedEvent(ob_display, FocusIn, &fi)) {
|
||||||
event_process(&fi);
|
event_process(&fi);
|
||||||
|
|
||||||
if (fi.xfocus.window == e->xfocus.window)
|
|
||||||
return;
|
|
||||||
/* secret magic way of event_process telling us that no client
|
/* secret magic way of event_process telling us that no client
|
||||||
was found for the FocusIn event */
|
was found for the FocusIn event */
|
||||||
if (fi.xfocus.window == None)
|
if (fi.xfocus.window != None)
|
||||||
focus_fallback(FALSE);
|
focus_fallback(FALSE);
|
||||||
|
if (fi.xfocus.window == e->xfocus.window)
|
||||||
|
return;
|
||||||
} else
|
} else
|
||||||
focus_fallback(FALSE);
|
focus_fallback(FALSE);
|
||||||
}
|
}
|
||||||
|
@ -274,8 +274,6 @@ void event_process(XEvent *e)
|
||||||
event_handle_root(e);
|
event_handle_root(e);
|
||||||
else if (e->type == MapRequest)
|
else if (e->type == MapRequest)
|
||||||
client_manage(window);
|
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) {
|
else if (e->type == ConfigureRequest) {
|
||||||
/* unhandled configure requests must be used to configure the
|
/* unhandled configure requests must be used to configure the
|
||||||
window directly */
|
window directly */
|
||||||
|
@ -347,6 +345,8 @@ static void event_handle_client(Client *client, XEvent *e)
|
||||||
/* focus state can affect the stacking layer */
|
/* focus state can affect the stacking layer */
|
||||||
client_calc_layer(client);
|
client_calc_layer(client);
|
||||||
engine_frame_adjust_focus(client->frame);
|
engine_frame_adjust_focus(client->frame);
|
||||||
|
|
||||||
|
e->xfocus.window = None; /* says a client was found for the event! */
|
||||||
break;
|
break;
|
||||||
case EnterNotify:
|
case EnterNotify:
|
||||||
if (client_normal(client)) {
|
if (client_normal(client)) {
|
||||||
|
|
Loading…
Reference in a new issue