src/video/x11/SDL_x11events.c
changeset 6660 4fa0723e6874
parent 6659 4016ef96095a
child 6661 cd8befc0a969
equal deleted inserted replaced
6659:4016ef96095a 6660:4fa0723e6874
   247         }
   247         }
   248         break;
   248         break;
   249 
   249 
   250         /* Gaining input focus? */
   250         /* Gaining input focus? */
   251     case FocusIn:{
   251     case FocusIn:{
       
   252             if (xevent.xfocus.detail == NotifyInferior) {
       
   253 #ifdef DEBUG_XEVENTS
       
   254                 printf("window %p: FocusIn (NotifierInferior, ignoring)\n", data);
       
   255 #endif
       
   256                 break;
       
   257             }
   252 #ifdef DEBUG_XEVENTS
   258 #ifdef DEBUG_XEVENTS
   253             printf("window %p: FocusIn!\n", data);
   259             printf("window %p: FocusIn!\n", data);
   254 #endif
   260 #endif
   255             data->pending_focus = PENDING_FOCUS_IN;
   261             data->pending_focus = PENDING_FOCUS_IN;
   256             data->pending_focus_time = SDL_GetTicks() + PENDING_FOCUS_IN_TIME;
   262             data->pending_focus_time = SDL_GetTicks() + PENDING_FOCUS_IN_TIME;
   257         }
   263         }
   258         break;
   264         break;
   259 
   265 
   260         /* Losing input focus? */
   266         /* Losing input focus? */
   261     case FocusOut:{
   267     case FocusOut:{
       
   268             if (xevent.xfocus.detail == NotifyInferior) {
       
   269                 /* We still have focus if a child gets focus */
       
   270 #ifdef DEBUG_XEVENTS
       
   271                 printf("window %p: FocusOut (NotifierInferior, ignoring)\n", data);
       
   272 #endif
       
   273                 break;
       
   274             }
   262 #ifdef DEBUG_XEVENTS
   275 #ifdef DEBUG_XEVENTS
   263             printf("window %p: FocusOut!\n", data);
   276             printf("window %p: FocusOut!\n", data);
   264 #endif
   277 #endif
   265             data->pending_focus = PENDING_FOCUS_OUT;
   278             data->pending_focus = PENDING_FOCUS_OUT;
   266             data->pending_focus_time = SDL_GetTicks() + PENDING_FOCUS_OUT_TIME;
   279             data->pending_focus_time = SDL_GetTicks() + PENDING_FOCUS_OUT_TIME;