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

This commit is contained in:
Sam Lantinga 2021-10-06 09:09:09 -07:00
parent 87ac373493
commit 1ec409c214
1 changed files with 4 additions and 0 deletions

View File

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