src/events/SDL_mouse.c
changeset 6829 36ce2e6166e7
parent 6755 af77e1a6faf0
child 6885 700f1b25f77f
equal deleted inserted replaced
6828:ac7f004fb63c 6829:36ce2e6166e7
    94 
    94 
    95     if (mouse->focus == window) {
    95     if (mouse->focus == window) {
    96         return;
    96         return;
    97     }
    97     }
    98 
    98 
       
    99     /* Actually, this ends up being a bad idea, because most operating
       
   100        systems have an implicit grab when you press the mouse button down
       
   101        so you can drag things out of the window and then get the mouse up
       
   102        when it happens.  So, #if 0...
       
   103     */
       
   104 #if 0
    99     if (mouse->focus && !window) {
   105     if (mouse->focus && !window) {
   100         /* We won't get anymore mouse messages, so reset mouse state */
   106         /* We won't get anymore mouse messages, so reset mouse state */
   101         SDL_ResetMouse();
   107         SDL_ResetMouse();
   102     }
   108     }
       
   109 #endif
   103 
   110 
   104     /* See if the current window has lost focus */
   111     /* See if the current window has lost focus */
   105     if (mouse->focus) {
   112     if (mouse->focus) {
   106         SDL_SendWindowEvent(mouse->focus, SDL_WINDOWEVENT_LEAVE, 0, 0);
   113         SDL_SendWindowEvent(mouse->focus, SDL_WINDOWEVENT_LEAVE, 0, 0);
   107     }
   114     }