From d90abaa4a9c0f2c7c869776745b30a5f03f464e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Wed, 31 May 2017 09:05:53 +0200 Subject: [PATCH] Fix mouse cursor leaving the rendering area when captured --- src/WIN/win.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/WIN/win.c b/src/WIN/win.c index 09d271da5..0be43d165 100644 --- a/src/WIN/win.c +++ b/src/WIN/win.c @@ -326,7 +326,7 @@ void mainthread(LPVOID param) if (mousecapture) { - GetWindowRect(ghwnd, &r); + GetWindowRect(hwndRender, &r); ClipCursor(&r); } @@ -2059,7 +2059,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM if (!mousecapture && !video_fullscreen) { GetClipCursor(&oldclip); - GetWindowRect(hwnd, &rect); + GetWindowRect(hwndRender, &rect); ClipCursor(&rect); mousecapture = 1; @@ -2101,7 +2101,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM if (mousecapture) { - GetWindowRect(hwnd, &rect); + GetWindowRect(hwndRender, &rect); ClipCursor(&rect); }