diff options
| author | Guilherme Felipe | 2018-05-23 16:25:41 -0300 |
|---|---|---|
| committer | Guilherme Felipe | 2018-05-23 17:42:31 -0300 |
| commit | 8c17d8e6fe632564965d861936be0c7e63c689bf (patch) | |
| tree | e2509de316b446f24f58b9085eada409399f7899 /platform/windows/os_windows.cpp | |
| parent | d55351ed20def8c84e36435ce8c85a1701b73ffd (diff) | |
| download | godot-8c17d8e6fe632564965d861936be0c7e63c689bf.tar.gz godot-8c17d8e6fe632564965d861936be0c7e63c689bf.tar.zst godot-8c17d8e6fe632564965d861936be0c7e63c689bf.zip | |
Diffstat (limited to 'platform/windows/os_windows.cpp')
| -rw-r--r-- | platform/windows/os_windows.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 09e3936a6..8d664b583 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -628,21 +628,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) video_mode.height = window_h; } else { preserve_window_size = false; - int w = video_mode.width; - int h = video_mode.height; - - RECT rect; - GetWindowRect(hWnd, &rect); - - if (video_mode.borderless_window == false) { - RECT crect; - GetClientRect(hWnd, &crect); - - w += (rect.right - rect.left) - (crect.right - crect.left); - h += (rect.bottom - rect.top) - (crect.bottom - crect.top); - } - - MoveWindow(hWnd, rect.left, rect.top, w, h, TRUE); + set_window_size(Size2(video_mode.width, video_mode.height)); } if (wParam == SIZE_MAXIMIZED) { maximized = true; |
