From b240b5be8402bc97c12d1819b26203765fb9f888 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:40:40 +0300 Subject: [PATCH] [Windows] Do not force redraw window background on mouse pass-through region change. --- platform/windows/display_server_windows.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index e32b3770472..b1dccdcefe7 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -1187,7 +1187,7 @@ void DisplayServerWindows::_update_window_mouse_passthrough(WindowID p_window) { ERR_FAIL_COND(!windows.has(p_window)); if (windows[p_window].mpass || windows[p_window].mpath.size() == 0) { - SetWindowRgn(windows[p_window].hWnd, nullptr, TRUE); + SetWindowRgn(windows[p_window].hWnd, nullptr, FALSE); } else { POINT *points = (POINT *)memalloc(sizeof(POINT) * windows[p_window].mpath.size()); for (int i = 0; i < windows[p_window].mpath.size(); i++) { @@ -1201,8 +1201,7 @@ void DisplayServerWindows::_update_window_mouse_passthrough(WindowID p_window) { } HRGN region = CreatePolygonRgn(points, windows[p_window].mpath.size(), ALTERNATE); - SetWindowRgn(windows[p_window].hWnd, region, TRUE); - DeleteObject(region); + SetWindowRgn(windows[p_window].hWnd, region, FALSE); memfree(points); } }