src/video/x11/SDL_x11events.c
changeset 7402 235c9aaeefd1
parent 7396 a36ab6149a10
child 7475 c244bc85fb84
equal deleted inserted replaced
7401:698995795574 7402:235c9aaeefd1
   185 }
   185 }
   186 
   186 
   187 #if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
   187 #if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
   188 static void X11_HandleGenericEvent(SDL_VideoData *videodata,XEvent event)
   188 static void X11_HandleGenericEvent(SDL_VideoData *videodata,XEvent event)
   189 {
   189 {
   190     if (XGetEventData(videodata->display, &event)) {
   190     /* event is a union, so cookie == &event, but this is type safe. */
   191         XGenericEventCookie *cookie = &event.xcookie;
   191     XGenericEventCookie *cookie = &event.xcookie;
       
   192     if (XGetEventData(videodata->display, cookie)) {
   192         X11_HandleXinput2Event(videodata, cookie);
   193         X11_HandleXinput2Event(videodata, cookie);
   193         XFreeEventData(videodata->display, cookie);
   194         XFreeEventData(videodata->display, cookie);
   194     }
   195     }
   195 }
   196 }
   196 #endif /* SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */
   197 #endif /* SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */