comparison src/video/x11/SDL_x11events.c @ 3763:81ea7d9a6624 gsoc2008_manymouse

Proximity events and evil-temporary makefile repair
author Szymon Wilczek <kazeuser@gmail.com>
date Wed, 02 Jul 2008 20:29:29 +0000
parents e0c95ad1ba87
children 2970fcfbdd54
comparison
equal deleted inserted replaced
3762:f667489e7309 3763:81ea7d9a6624
33 //int SDL_numOfEvents; 33 //int SDL_numOfEvents;
34 34
35 extern int motion; 35 extern int motion;
36 extern int button_pressed; 36 extern int button_pressed;
37 extern int button_released; 37 extern int button_released;
38 extern int proximity_in;
39 extern int proximity_out;
40
38 41
39 static void 42 static void
40 X11_DispatchEvent(_THIS) 43 X11_DispatchEvent(_THIS)
41 { 44 {
42 SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; 45 SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
313 { 316 {
314 XDeviceButtonReleasedEvent* released=(XDeviceButtonReleasedEvent*)&xevent; 317 XDeviceButtonReleasedEvent* released=(XDeviceButtonReleasedEvent*)&xevent;
315 SDL_SendMouseButton(released->deviceid, SDL_RELEASED, 318 SDL_SendMouseButton(released->deviceid, SDL_RELEASED,
316 released->button); 319 released->button);
317 } 320 }
321 else if(xevent.type==proximity_in)
322 {
323 XProximityNotifyEvent* proximity = (XProximityNotifyEvent*)&xevent;
324 SDL_SendProximity(proximity->deviceid, proximity->x, proximity->y,SDL_PROXIMITYIN);
325 }
326 else if(xevent.type==proximity_out)
327 {
328 XProximityNotifyEvent* proximity = (XProximityNotifyEvent*)&xevent;
329 SDL_SendProximity(proximity->deviceid, proximity->x, proximity->y,SDL_PROXIMITYOUT);
330 }
318 else 331 else
319 { 332 {
320 #ifdef DEBUG_XEVENTS 333 #ifdef DEBUG_XEVENTS
321 printf("Unhandled event %d\n", xevent.type); 334 printf("Unhandled event %d\n", xevent.type);
322 #endif 335 #endif