Don't reset the mouse, that's actually bad behavior most of the time for windowed applications.
authorSam Lantinga <slouken@libsdl.org>
Sun, 27 Jan 2013 20:37:14 -0800
changeset 682936ce2e6166e7
parent 6828 ac7f004fb63c
child 6830 0cd3e2e9b2c5
Don't reset the mouse, that's actually bad behavior most of the time for windowed applications.
src/events/SDL_mouse.c
     1.1 --- a/src/events/SDL_mouse.c	Sun Jan 27 21:43:20 2013 -0300
     1.2 +++ b/src/events/SDL_mouse.c	Sun Jan 27 20:37:14 2013 -0800
     1.3 @@ -96,10 +96,17 @@
     1.4          return;
     1.5      }
     1.6  
     1.7 +    /* Actually, this ends up being a bad idea, because most operating
     1.8 +       systems have an implicit grab when you press the mouse button down
     1.9 +       so you can drag things out of the window and then get the mouse up
    1.10 +       when it happens.  So, #if 0...
    1.11 +    */
    1.12 +#if 0
    1.13      if (mouse->focus && !window) {
    1.14          /* We won't get anymore mouse messages, so reset mouse state */
    1.15          SDL_ResetMouse();
    1.16      }
    1.17 +#endif
    1.18  
    1.19      /* See if the current window has lost focus */
    1.20      if (mouse->focus) {