More fixes to set_borderless_window
[x11] Preserve window size when calling this method. [osx] Make sure it don't make the window resizable if it's not needed. [windows] clean up the code.
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user