diff src/video/x11/SDL_x11video.c @ 3761:e0c95ad1ba87 gsoc2008_manymouse

Major bug fixes
author Szymon Wilczek <kazeuser@gmail.com>
date Thu, 19 Jun 2008 17:24:30 +0000
parents 64f346a83ed3
children 81ea7d9a6624
line wrap: on
line diff
--- a/src/video/x11/SDL_x11video.c	Fri Jun 06 15:23:29 2008 +0000
+++ b/src/video/x11/SDL_x11video.c	Thu Jun 19 17:24:30 2008 +0000
@@ -34,6 +34,7 @@
 int SDL_NumOfXDevices;
 XEventClass SDL_XEvents[256];
 int SDL_NumOfXEvents;
+int motion, button_pressed, button_released;
 
 /* Initialization/Query functions */
 static int X11_VideoInit(_THIS);
@@ -262,9 +263,17 @@
 
 	/* button events */
 	DeviceButtonPress(SDL_XDevices[i],c_not_needed,xEvent);
-	if (xEvent) SDL_XEvents[index++] = xEvent;
+	if (xEvent) 
+    {
+        SDL_XEvents[index++] = xEvent;
+        button_pressed=c_not_needed;
+    }
 	DeviceButtonRelease(SDL_XDevices[i],c_not_needed,xEvent);
-	if (xEvent) SDL_XEvents[index++] = xEvent;
+	if (xEvent)
+    {
+        SDL_XEvents[index++] = xEvent;
+        button_released=c_not_needed;
+    }
 
 	/* proximity events */
 	ProximityIn(SDL_XDevices[i],c_not_needed,xEvent);
@@ -274,7 +283,12 @@
 
 	/* motion events */
 	DeviceMotionNotify(SDL_XDevices[i],c_not_needed,xEvent);
-	if (xEvent) SDL_XEvents[index++] = xEvent;
+	if (xEvent) 
+    {
+        SDL_XEvents[index++] = xEvent;
+        motion=c_not_needed;
+        //printf("motion: %d", c_not_needed);
+    }
 
 	/* device state */
 	DeviceStateNotify(SDL_XDevices[i],c_not_needed,xEvent);