Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Don't lose focus if a child window gains focus

  • Loading branch information
slouken committed Nov 7, 2012
1 parent ceff0a1 commit ced78c6c8561cd0df4d3a2d6eee00bfbf1d3a31a
Showing with 13 additions and 0 deletions.
  1. +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

0 comments on commit ced78c6

Please sign in to comment.