comparison 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
comparison
equal deleted inserted replaced
3760:64f346a83ed3 3761:e0c95ad1ba87
32 32
33 XDevice **SDL_XDevices; 33 XDevice **SDL_XDevices;
34 int SDL_NumOfXDevices; 34 int SDL_NumOfXDevices;
35 XEventClass SDL_XEvents[256]; 35 XEventClass SDL_XEvents[256];
36 int SDL_NumOfXEvents; 36 int SDL_NumOfXEvents;
37 int motion, button_pressed, button_released;
37 38
38 /* Initialization/Query functions */ 39 /* Initialization/Query functions */
39 static int X11_VideoInit(_THIS); 40 static int X11_VideoInit(_THIS);
40 static void X11_VideoQuit(_THIS); 41 static void X11_VideoQuit(_THIS);
41 42
260 DeviceFocusOut(SDL_XDevices[i],c_not_needed,xEvent); 261 DeviceFocusOut(SDL_XDevices[i],c_not_needed,xEvent);
261 if (xEvent) SDL_XEvents[index++] = xEvent; 262 if (xEvent) SDL_XEvents[index++] = xEvent;
262 263
263 /* button events */ 264 /* button events */
264 DeviceButtonPress(SDL_XDevices[i],c_not_needed,xEvent); 265 DeviceButtonPress(SDL_XDevices[i],c_not_needed,xEvent);
265 if (xEvent) SDL_XEvents[index++] = xEvent; 266 if (xEvent)
267 {
268 SDL_XEvents[index++] = xEvent;
269 button_pressed=c_not_needed;
270 }
266 DeviceButtonRelease(SDL_XDevices[i],c_not_needed,xEvent); 271 DeviceButtonRelease(SDL_XDevices[i],c_not_needed,xEvent);
267 if (xEvent) SDL_XEvents[index++] = xEvent; 272 if (xEvent)
273 {
274 SDL_XEvents[index++] = xEvent;
275 button_released=c_not_needed;
276 }
268 277
269 /* proximity events */ 278 /* proximity events */
270 ProximityIn(SDL_XDevices[i],c_not_needed,xEvent); 279 ProximityIn(SDL_XDevices[i],c_not_needed,xEvent);
271 if (xEvent) SDL_XEvents[index++] = xEvent; 280 if (xEvent) SDL_XEvents[index++] = xEvent;
272 ProximityOut(SDL_XDevices[i],c_not_needed,xEvent); 281 ProximityOut(SDL_XDevices[i],c_not_needed,xEvent);
273 if (xEvent) SDL_XEvents[index++] = xEvent; 282 if (xEvent) SDL_XEvents[index++] = xEvent;
274 283
275 /* motion events */ 284 /* motion events */
276 DeviceMotionNotify(SDL_XDevices[i],c_not_needed,xEvent); 285 DeviceMotionNotify(SDL_XDevices[i],c_not_needed,xEvent);
277 if (xEvent) SDL_XEvents[index++] = xEvent; 286 if (xEvent)
287 {
288 SDL_XEvents[index++] = xEvent;
289 motion=c_not_needed;
290 //printf("motion: %d", c_not_needed);
291 }
278 292
279 /* device state */ 293 /* device state */
280 DeviceStateNotify(SDL_XDevices[i],c_not_needed,xEvent); 294 DeviceStateNotify(SDL_XDevices[i],c_not_needed,xEvent);
281 if (xEvent) SDL_XEvents[index++] = xEvent; 295 if (xEvent) SDL_XEvents[index++] = xEvent;
282 DeviceMappingNotify(SDL_XDevices[i], 296 DeviceMappingNotify(SDL_XDevices[i],