comparison src/video/x11/SDL_x11events.c @ 4484:9322f7db8603

Cleaned up the mouse window focus handling: you always pass in the relative window when sending a mouse event. Fixed a bug where only mouse wheel up was sent on Mac OS X Fixed a bug where mouse window focus was getting hosed by the fullscreen mouse code on Mac OS X
author Sam Lantinga <slouken@libsdl.org>
date Mon, 05 Jul 2010 22:48:13 -0700
parents 791b3256fb22
children 15d2c6f40c48
comparison
equal deleted inserted replaced
4483:539f3eca8798 4484:9322f7db8603
270 270
271 case MotionNotify:{ 271 case MotionNotify:{
272 #ifdef DEBUG_MOTION 272 #ifdef DEBUG_MOTION
273 printf("X11 motion: %d,%d\n", xevent.xmotion.x, xevent.xmotion.y); 273 printf("X11 motion: %d,%d\n", xevent.xmotion.x, xevent.xmotion.y);
274 #endif 274 #endif
275 SDL_SendMouseMotion(0, xevent.xmotion.x, xevent.xmotion.y); 275 SDL_SendMouseMotion(data->window, 0, xevent.xmotion.x, xevent.xmotion.y);
276 } 276 }
277 break; 277 break;
278 278
279 case ButtonPress:{ 279 case ButtonPress:{
280 SDL_SendMouseButton(SDL_PRESSED, xevent.xbutton.button); 280 SDL_SendMouseButton(data->window, SDL_PRESSED, xevent.xbutton.button);
281 } 281 }
282 break; 282 break;
283 283
284 case ButtonRelease:{ 284 case ButtonRelease:{
285 SDL_SendMouseButton(SDL_RELEASED, xevent.xbutton.button); 285 SDL_SendMouseButton(data->window, SDL_RELEASED, xevent.xbutton.button);
286 } 286 }
287 break; 287 break;
288 288
289 default:{ 289 default:{
290 #ifdef DEBUG_XEVENTS 290 #ifdef DEBUG_XEVENTS