diff src/video/x11/SDL_x11mouse.h @ 2940:b93965a16fe0

Fixed X11 mouse motion/button events - it's not actually safe to cast mouse events to device events. Fixed building SDL without XInput support Simplified the process of registering a mouse device
author Sam Lantinga <slouken@libsdl.org>
date Thu, 01 Jan 2009 07:59:08 +0000
parents 99210400e8b9
children f7b03b6838cb
line wrap: on
line diff
--- a/src/video/x11/SDL_x11mouse.h	Thu Jan 01 07:58:20 2009 +0000
+++ b/src/video/x11/SDL_x11mouse.h	Thu Jan 01 07:59:08 2009 +0000
@@ -24,6 +24,21 @@
 #ifndef _SDL_x11mouse_h
 #define _SDL_x11mouse_h
 
+#if SDL_VIDEO_DRIVER_X11_XINPUT
+typedef struct X11_MouseData
+{
+    Display *display;
+    XDevice *device;
+    int motion;
+    int button_pressed;
+    int button_released;
+    int proximity_in;
+    int proximity_out;
+    int num_xevents;
+    XEventClass xevents[5];
+} X11_MouseData;
+#endif
+
 extern void X11_InitMouse(_THIS);
 extern void X11_QuitMouse(_THIS);