SDL: Fixed mouse clip rect bounds on Windows

From 4d8bb89c469d4222b5f3f21c42c8d59678e2bb89 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 24 Jul 2022 11:50:14 -0700
Subject: [PATCH] Fixed mouse clip rect bounds on Windows

Fixes https://github.com/libsdl-org/SDL/issues/5946
---
 src/video/windows/SDL_windowswindow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index 413c006e9d4..f02d425540f 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -1296,8 +1296,8 @@ WIN_UpdateClipCursor(SDL_Window *window)
                     /* mouse_rect is the rect in Windows screen space */
                     mouse_rect.left = rect.left + mouse_rect_win_client.x;
                     mouse_rect.top = rect.top + mouse_rect_win_client.y;
-                    mouse_rect.right = mouse_rect.left + mouse_rect_win_client.w - 1;
-                    mouse_rect.bottom = mouse_rect.top + mouse_rect_win_client.h - 1;
+                    mouse_rect.right = mouse_rect.left + mouse_rect_win_client.w;
+                    mouse_rect.bottom = mouse_rect.top + mouse_rect_win_client.h;
                     if (IntersectRect(&intersection, &rect, &mouse_rect)) {
                         SDL_memcpy(&rect, &intersection, sizeof(rect));
                     } else if ((window->flags & SDL_WINDOW_MOUSE_GRABBED) != 0) {