SDL: Limit effect of in_title_click and focus_click_pending to only blocking cursor warping; without this all relative mouse...

From 287571fb468bf3a4ccab7cac72b08c35f889779f Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 22 Sep 2021 17:40:57 -0700
Subject: [PATCH] Limit effect of in_title_click and focus_click_pending to
 only blocking cursor warping; without this all relative mouse motion was
 getting ignored when a window was activated via a mouse button

---
 src/video/windows/SDL_windowsevents.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index e995baa60d..a37d06acf7 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -731,10 +731,6 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                 }
             }
 
-            if (data->in_title_click || data->focus_click_pending) {
-                break;
-            }
-
             GetRawInputData(hRawInput, RID_INPUT, &inp, &size, sizeof(RAWINPUTHEADER));
 
             /* Mouse data (ignoring synthetic mouse events generated for touchscreens) */
@@ -807,8 +803,9 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                             } else {
                                 SDL_SendMouseMotion(data->window, mouseID, 1, relX, relY);
 
-                                if (x < boundsRect.left || x > boundsRect.right ||
-                                    y < boundsRect.top || y > boundsRect.bottom) {
+								if (!data->in_title_click && !data->focus_click_pending &&
+									(x < boundsRect.left || x > boundsRect.right ||
+									 y < boundsRect.top || y > boundsRect.bottom)) {
                                     /* Warp back to the opposite side, assuming more motion in the current direction */
                                     int warpX;
                                     int warpY;