From eca18f3c19a86f11d831395aab35a2ad58098ffa Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 11 Mar 2021 23:49:09 +0100 Subject: [PATCH] windisplay: Don't try to activate window when resizing/moving it This fixes an issue where if you quickly alt-tab when the window opens, it receives a WM_ACTIVATE event and thinks it continues to be active, which causes issues with applying cursor confinement. I think you can probably still reproduce that issue, but your reflexes have to be significantly more ninja now. --- panda/src/windisplay/winGraphicsWindow.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/windisplay/winGraphicsWindow.cxx b/panda/src/windisplay/winGraphicsWindow.cxx index 1e8921ec03..624c354781 100644 --- a/panda/src/windisplay/winGraphicsWindow.cxx +++ b/panda/src/windisplay/winGraphicsWindow.cxx @@ -749,7 +749,7 @@ do_reshape_request(int x_origin, int y_origin, bool has_origin, GetWindowInfo(_hWnd, &wi); AdjustWindowRectEx(&view_rect, wi.dwStyle, FALSE, wi.dwExStyle); - UINT flags = SWP_NOZORDER | SWP_NOSENDCHANGING; + UINT flags = SWP_NOZORDER | SWP_NOSENDCHANGING | SWP_NOACTIVATE; if (has_origin) { x_origin = view_rect.left;