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
This commit is contained in:
parent
8cafde92ae
commit
320eb4600b
6 changed files with 50 additions and 30 deletions
|
@ -272,17 +272,17 @@ X11_DispatchEvent(_THIS)
|
|||
#ifdef DEBUG_MOTION
|
||||
printf("X11 motion: %d,%d\n", xevent.xmotion.x, xevent.xmotion.y);
|
||||
#endif
|
||||
SDL_SendMouseMotion(0, xevent.xmotion.x, xevent.xmotion.y);
|
||||
SDL_SendMouseMotion(data->window, 0, xevent.xmotion.x, xevent.xmotion.y);
|
||||
}
|
||||
break;
|
||||
|
||||
case ButtonPress:{
|
||||
SDL_SendMouseButton(SDL_PRESSED, xevent.xbutton.button);
|
||||
SDL_SendMouseButton(data->window, SDL_PRESSED, xevent.xbutton.button);
|
||||
}
|
||||
break;
|
||||
|
||||
case ButtonRelease:{
|
||||
SDL_SendMouseButton(SDL_RELEASED, xevent.xbutton.button);
|
||||
SDL_SendMouseButton(data->window, SDL_RELEASED, xevent.xbutton.button);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue