SDL: Don't send relative motion while in a modal loop

From 2e61b4165286f5a4fcfecfb28dedc8589ae14c10 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
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.
---
 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 dce81ba015bbf..2b069f6c23c4c 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -624,7 +624,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 {