src/video/x11/SDL_x11events.c
changeset 2794 f7872b7a8732
parent 2763 6fc50bdd88c0
child 2859 99210400e8b9
     1.1 --- a/src/video/x11/SDL_x11events.c	Thu Nov 27 05:29:12 2008 +0000
     1.2 +++ b/src/video/x11/SDL_x11events.c	Thu Nov 27 21:53:18 2008 +0000
     1.3 @@ -278,16 +278,10 @@
     1.4  
     1.5      default:{
     1.6              if (xevent.type == motion) {        /* MotionNotify */
     1.7 +                XDeviceMotionEvent *move = (XDeviceMotionEvent *) & xevent;
     1.8  #ifdef DEBUG_MOTION
     1.9 -                printf("X11 motion: %d,%d\n", xevent.xmotion.x,
    1.10 -                       xevent.xmotion.y);
    1.11 +                printf("X11 motion: %d,%d\n", move->x, move->y);
    1.12  #endif
    1.13 -                XWindowAttributes attrib;
    1.14 -                XGetWindowAttributes(videodata->display,
    1.15 -                                     ((XAnyEvent *) & xevent)->window,
    1.16 -                                     &attrib);
    1.17 -                SDL_UpdateCoordinates(attrib.width, attrib.height);
    1.18 -                XDeviceMotionEvent *move = (XDeviceMotionEvent *) & xevent;
    1.19                  SDL_SendMouseMotion(move->deviceid, 0, move->x,
    1.20                                      move->y, move->axis_data[2]);
    1.21              } else if (xevent.type == button_pressed) { /* ButtonPress */