Merge pull request #78151 from jpcerrone/fix_windowed_move_problems

Fix window resizing problems on Windows
This commit is contained in:
Rémi Verschelde 2023-06-13 10:27:14 +02:00
commit 9e7349bda3
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1384,6 +1384,8 @@ void DisplayServerWindows::window_set_mode(WindowMode p_mode, WindowID p_window)
wd.multiwindow_fs = false;
wd.maximized = wd.was_maximized;
_update_window_style(p_window, false);
if (wd.pre_fs_valid) {
rect = wd.pre_fs_rect;
} else {
@ -1394,8 +1396,6 @@ void DisplayServerWindows::window_set_mode(WindowMode p_mode, WindowID p_window)
wd.pre_fs_valid = true;
}
_update_window_style(p_window, false);
MoveWindow(wd.hWnd, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, TRUE);
if (restore_mouse_trails > 1) {