diff src/video/x11/SDL_x11events.c @ 2794:f7872b7a8732

Fixed mouse coordinate range on Mac OS X
author Sam Lantinga <slouken@libsdl.org>
date Thu, 27 Nov 2008 21:53:18 +0000
parents 6fc50bdd88c0
children 99210400e8b9
line wrap: on
line diff
--- a/src/video/x11/SDL_x11events.c	Thu Nov 27 05:29:12 2008 +0000
+++ b/src/video/x11/SDL_x11events.c	Thu Nov 27 21:53:18 2008 +0000
@@ -278,16 +278,10 @@
 
     default:{
             if (xevent.type == motion) {        /* MotionNotify */
+                XDeviceMotionEvent *move = (XDeviceMotionEvent *) & xevent;
 #ifdef DEBUG_MOTION
-                printf("X11 motion: %d,%d\n", xevent.xmotion.x,
-                       xevent.xmotion.y);
+                printf("X11 motion: %d,%d\n", move->x, move->y);
 #endif
-                XWindowAttributes attrib;
-                XGetWindowAttributes(videodata->display,
-                                     ((XAnyEvent *) & xevent)->window,
-                                     &attrib);
-                SDL_UpdateCoordinates(attrib.width, attrib.height);
-                XDeviceMotionEvent *move = (XDeviceMotionEvent *) & xevent;
                 SDL_SendMouseMotion(move->deviceid, 0, move->x,
                                     move->y, move->axis_data[2]);
             } else if (xevent.type == button_pressed) { /* ButtonPress */