Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Don't lose focus if a child window gains focus
- Loading branch information
Showing
with
13 additions
and
0 deletions.
-
+13
−0
src/video/x11/SDL_x11events.c
|
@@ -249,6 +249,12 @@ X11_DispatchEvent(_THIS) |
|
|
|
|
|
/* Gaining input focus? */ |
|
|
case FocusIn:{ |
|
|
if (xevent.xfocus.detail == NotifyInferior) { |
|
|
#ifdef DEBUG_XEVENTS |
|
|
printf("window %p: FocusIn (NotifierInferior, ignoring)\n", data); |
|
|
#endif |
|
|
break; |
|
|
} |
|
|
#ifdef DEBUG_XEVENTS |
|
|
printf("window %p: FocusIn!\n", data); |
|
|
#endif |
|
@@ -259,6 +265,13 @@ X11_DispatchEvent(_THIS) |
|
|
|
|
|
/* Losing input focus? */ |
|
|
case FocusOut:{ |
|
|
if (xevent.xfocus.detail == NotifyInferior) { |
|
|
/* We still have focus if a child gets focus */ |
|
|
#ifdef DEBUG_XEVENTS |
|
|
printf("window %p: FocusOut (NotifierInferior, ignoring)\n", data); |
|
|
#endif |
|
|
break; |
|
|
} |
|
|
#ifdef DEBUG_XEVENTS |
|
|
printf("window %p: FocusOut!\n", data); |
|
|
#endif |
|
|