Selaa lähdekoodia

Don't warp the mouse within a window while it's minimized

Sam Lantinga 4 vuotta sitten
vanhempi
commit
1ec409c214
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      src/events/SDL_mouse.c

+ 4 - 0
src/events/SDL_mouse.c

@@ -761,6 +761,10 @@ SDL_WarpMouseInWindow(SDL_Window * window, int x, int y)
         return;
     }
 
+    if ((window->flags & SDL_WINDOW_MINIMIZED) == SDL_WINDOW_MINIMIZED) {
+        return;
+    }
+
     if (mouse->WarpMouse) {
         mouse->WarpMouse(window, x, y);
     } else {