Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
x11: Pass generic XEvents by pointer instead of copying to stack for …
…XInput2.
  • Loading branch information
icculus committed Jul 31, 2017
1 parent 01e0d8f commit 5574b43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/video/x11/SDL_x11events.c
Expand Up @@ -303,10 +303,10 @@ static char* X11_URIToLocal(char* uri) {
}

#if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
static void X11_HandleGenericEvent(SDL_VideoData *videodata,XEvent event)
static void X11_HandleGenericEvent(SDL_VideoData *videodata, XEvent *xev)
{
/* event is a union, so cookie == &event, but this is type safe. */
XGenericEventCookie *cookie = &event.xcookie;
XGenericEventCookie *cookie = &xev->xcookie;
if (X11_XGetEventData(videodata->display, cookie)) {
X11_HandleXinput2Event(videodata, cookie);
X11_XFreeEventData(videodata->display, cookie);
Expand Down Expand Up @@ -696,7 +696,7 @@ X11_DispatchEvent(_THIS)

#if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
if(xevent.type == GenericEvent) {
X11_HandleGenericEvent(videodata,xevent);
X11_HandleGenericEvent(videodata, &xevent);
return;
}
#endif
Expand Down

0 comments on commit 5574b43

Please sign in to comment.