[Windows] Do not force redraw window background on mouse pass-through region change.
(cherry picked from commit b240b5be84
)
This commit is contained in:
parent
85ab269796
commit
eca105f075
|
@ -997,7 +997,7 @@ void DisplayServerWindows::_update_window_mouse_passthrough(WindowID p_window) {
|
||||||
ERR_FAIL_COND(!windows.has(p_window));
|
ERR_FAIL_COND(!windows.has(p_window));
|
||||||
|
|
||||||
if (windows[p_window].mpass || windows[p_window].mpath.size() == 0) {
|
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 {
|
} else {
|
||||||
POINT *points = (POINT *)memalloc(sizeof(POINT) * windows[p_window].mpath.size());
|
POINT *points = (POINT *)memalloc(sizeof(POINT) * windows[p_window].mpath.size());
|
||||||
for (int i = 0; i < windows[p_window].mpath.size(); i++) {
|
for (int i = 0; i < windows[p_window].mpath.size(); i++) {
|
||||||
|
@ -1011,8 +1011,7 @@ void DisplayServerWindows::_update_window_mouse_passthrough(WindowID p_window) {
|
||||||
}
|
}
|
||||||
|
|
||||||
HRGN region = CreatePolygonRgn(points, windows[p_window].mpath.size(), ALTERNATE);
|
HRGN region = CreatePolygonRgn(points, windows[p_window].mpath.size(), ALTERNATE);
|
||||||
SetWindowRgn(windows[p_window].hWnd, region, TRUE);
|
SetWindowRgn(windows[p_window].hWnd, region, FALSE);
|
||||||
DeleteObject(region);
|
|
||||||
memfree(points);
|
memfree(points);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue