mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 14:58:08 +00:00
fix nccalcsize in fullscreen mode
This commit is contained in:
@@ -647,7 +647,10 @@ os_w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
S32 frame_x = w32_GetSystemMetricsForDpi_func ? w32_GetSystemMetricsForDpi_func(SM_CXFRAME, dpi) : GetSystemMetrics(SM_CXFRAME);
|
||||
S32 frame_y = w32_GetSystemMetricsForDpi_func ? w32_GetSystemMetricsForDpi_func(SM_CYFRAME, dpi) : GetSystemMetrics(SM_CYFRAME);
|
||||
S32 padding = w32_GetSystemMetricsForDpi_func ? w32_GetSystemMetricsForDpi_func(SM_CXPADDEDBORDER, dpi) : GetSystemMetrics(SM_CXPADDEDBORDER);
|
||||
|
||||
DWORD window_style = GetWindowLong(hwnd, GWL_STYLE);
|
||||
B32 is_fullscreen = !(window_style & WS_OVERLAPPEDWINDOW);
|
||||
if(!is_fullscreen)
|
||||
{
|
||||
RECT* rect = wParam == 0 ? (RECT*)lParam : ((NCCALCSIZE_PARAMS*)lParam)->rgrc;
|
||||
rect->right -= frame_x + padding;
|
||||
rect->left += frame_x + padding;
|
||||
@@ -661,6 +664,7 @@ os_w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
rect->bottom -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
Reference in New Issue
Block a user