From 5574b4337697d084a8e17e41ff1c3228936ef975 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 31 Jul 2017 12:22:18 -0400 Subject: [PATCH] x11: Pass generic XEvents by pointer instead of copying to stack for XInput2. --- src/video/x11/SDL_x11events.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index ef12723ef..f6e1f7ddb 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -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); @@ -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