Don't reset the mouse, that's actually bad behavior most of the time for windowed applications.
This commit is contained in:
parent
9e1dc0a80d
commit
0c9fca187f
1 changed files with 7 additions and 0 deletions
|
@ -96,10 +96,17 @@ SDL_SetMouseFocus(SDL_Window * window)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Actually, this ends up being a bad idea, because most operating
|
||||||
|
systems have an implicit grab when you press the mouse button down
|
||||||
|
so you can drag things out of the window and then get the mouse up
|
||||||
|
when it happens. So, #if 0...
|
||||||
|
*/
|
||||||
|
#if 0
|
||||||
if (mouse->focus && !window) {
|
if (mouse->focus && !window) {
|
||||||
/* We won't get anymore mouse messages, so reset mouse state */
|
/* We won't get anymore mouse messages, so reset mouse state */
|
||||||
SDL_ResetMouse();
|
SDL_ResetMouse();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* See if the current window has lost focus */
|
/* See if the current window has lost focus */
|
||||||
if (mouse->focus) {
|
if (mouse->focus) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue