diff --git a/src/os/gfx/win32/os_gfx_win32.c b/src/os/gfx/win32/os_gfx_win32.c index 959f357e..33ee2a9f 100644 --- a/src/os/gfx/win32/os_gfx_win32.c +++ b/src/os/gfx/win32/os_gfx_win32.c @@ -647,18 +647,22 @@ 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); - - RECT* rect = wParam == 0 ? (RECT*)lParam : ((NCCALCSIZE_PARAMS*)lParam)->rgrc; - rect->right -= frame_x + padding; - rect->left += frame_x + padding; - rect->bottom -= frame_y + padding; - - if (IsMaximized(hwnd)) + DWORD window_style = GetWindowLong(hwnd, GWL_STYLE); + B32 is_fullscreen = !(window_style & WS_OVERLAPPEDWINDOW); + if(!is_fullscreen) { - rect->top += frame_y + padding; - // If we do not do this hidden taskbar can not be unhidden on mouse hover - // Unfortunately it can create an ugly bottom border when maximized... - rect->bottom -= 1; + RECT* rect = wParam == 0 ? (RECT*)lParam : ((NCCALCSIZE_PARAMS*)lParam)->rgrc; + rect->right -= frame_x + padding; + rect->left += frame_x + padding; + rect->bottom -= frame_y + padding; + + if(IsMaximized(hwnd)) + { + rect->top += frame_y + padding; + // If we do not do this hidden taskbar can not be unhidden on mouse hover + // Unfortunately it can create an ugly bottom border when maximized... + rect->bottom -= 1; + } } } else @@ -704,7 +708,7 @@ os_w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) pos_monitor.y = GET_Y_LPARAM(lParam); POINT pos_client = pos_monitor; ScreenToClient(hwnd, &pos_client); - + // Adjustments happening in NCCALCSIZE are messing with the detection // of the top hit area so manually checking that. F32 dpi = w32_GetDpiForWindow_func ? (F32)w32_GetDpiForWindow_func(hwnd) : 96.f;