src/events/SDL_mouse.c
changeset 6667 243bfb5c31d6
parent 6666 018f8019ce36
child 6673 78f18a929123
     1.1 --- a/src/events/SDL_mouse.c	Thu Nov 08 02:26:40 2012 -0800
     1.2 +++ b/src/events/SDL_mouse.c	Thu Nov 08 11:15:02 2012 -0800
     1.3 @@ -130,7 +130,21 @@
     1.4      } else {
     1.5          inWindow = SDL_TRUE;
     1.6      }
     1.7 +
     1.8 +/* Linux doesn't give you mouse events outside your window unless you grab
     1.9 +   the pointer.
    1.10 +
    1.11 +   Windows doesn't give you mouse events outside your window unless you call
    1.12 +   SetCapture().
    1.13 +
    1.14 +   Both of these are slightly scary changes, so for now we'll punt and if the
    1.15 +   mouse leaves the window you'll lose mouse focus and reset button state.
    1.16 +*/
    1.17 +#ifdef SUPPORT_DRAG_OUTSIDE_WINDOW
    1.18      if (!inWindow && !buttonstate) {
    1.19 +#else
    1.20 +    if (!inWindow) {
    1.21 +#endif
    1.22          if (window == mouse->focus) {
    1.23  #ifdef DEBUG_MOUSE
    1.24              printf("Mouse left window, synthesizing focus lost event\n");