diff --git a/windows/window_manager_plugin.cpp b/windows/window_manager_plugin.cpp index 5189cff5..8e112a8b 100644 --- a/windows/window_manager_plugin.cpp +++ b/windows/window_manager_plugin.cpp @@ -109,9 +109,21 @@ std::optional WindowManagerPlugin::HandleWindowProc(HWND hWnd, std::optional result = std::nullopt; if (message == WM_NCCALCSIZE) { + if (wParam && window_manager->IsFullScreen()) { + NCCALCSIZE_PARAMS* sz = reinterpret_cast(lParam); + sz->rgrc[0].bottom -= 3; + return (WVR_HREDRAW | WVR_VREDRAW); + } + if (wParam && window_manager->is_frameless_) { SetWindowLong(hWnd, 0, 0); NCCALCSIZE_PARAMS* sz = reinterpret_cast(lParam); + if (window_manager->IsMaximized()) { + sz->rgrc[0].left += 8; + sz->rgrc[0].top += 8; + sz->rgrc[0].right -= 8; + sz->rgrc[0].bottom -= 9; + } sz->rgrc[0].bottom += 1; return (WVR_HREDRAW | WVR_VREDRAW); }