mirror of https://github.com/encounter/SDL.git
x11: Fix spurious keyboard focus events
This commit is contained in:
parent
48989e2a87
commit
f1d5ced167
|
@ -818,9 +818,9 @@ X11_DispatchEvent(_THIS)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xevent.xfocus.detail == NotifyInferior) {
|
if (xevent.xfocus.detail == NotifyInferior || xevent.xfocus.detail == NotifyPointer) {
|
||||||
#ifdef DEBUG_XEVENTS
|
#ifdef DEBUG_XEVENTS
|
||||||
printf("window %p: FocusIn (NotifierInferior, ignoring)\n", data);
|
printf("window %p: FocusIn (NotifyInferior/NotifyPointer, ignoring)\n", data);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -851,10 +851,12 @@ X11_DispatchEvent(_THIS)
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (xevent.xfocus.detail == NotifyInferior) {
|
if (xevent.xfocus.detail == NotifyInferior || xevent.xfocus.detail == NotifyPointer) {
|
||||||
/* We still have focus if a child gets focus */
|
/* We still have focus if a child gets focus. We also don't
|
||||||
|
care about the position of the pointer when the keyboard
|
||||||
|
focus changed. */
|
||||||
#ifdef DEBUG_XEVENTS
|
#ifdef DEBUG_XEVENTS
|
||||||
printf("window %p: FocusOut (NotifierInferior, ignoring)\n", data);
|
printf("window %p: FocusOut (NotifyInferior/NotifyPointer, ignoring)\n", data);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue