From d73ad0ef1896625d09c96032ab18737f70c2d725 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 27 Mar 2025 08:09:55 -0700 Subject: [PATCH] Don't send relative motion while in a modal loop This fixes queuing up a bunch of relative motion events while moving or resizing a window. (cherry picked from commit 2e61b4165286f5a4fcfecfb28dedc8589ae14c10) --- src/video/windows/SDL_windowsevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index e6f10480d7..3738b878f1 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -620,7 +620,7 @@ static void WIN_HandleRawMouseInput(Uint64 timestamp, SDL_VideoData *data, HANDL SDL_WindowData *windowdata = window->internal; - if (haveMotion) { + if (haveMotion && !windowdata->in_modal_loop) { if (!isAbsolute) { SDL_SendMouseMotion(timestamp, window, mouseID, true, (float)dx, (float)dy); } else {