From b4e38bd818f81e934e8717ec3d13757cee85ee62 Mon Sep 17 00:00:00 2001 From: Jannis Weis <31143295+weisJ@users.noreply.github.com> Date: Sat, 8 Jan 2022 18:27:58 +0100 Subject: [PATCH] Windows: Use rcWork instead of rcMonitor in window bounds adjustments The bottom would never be adjusted because of the taskbar. --- windows/src/main/cpp/Decorations.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/windows/src/main/cpp/Decorations.cpp b/windows/src/main/cpp/Decorations.cpp index f751cede..2e04979d 100644 --- a/windows/src/main/cpp/Decorations.cpp +++ b/windows/src/main/cpp/Decorations.cpp @@ -261,10 +261,10 @@ static void HandleNCCalcSize(WindowWrapper *wrapper, WPARAM wparam, LPARAM lpara if (is_windows_11) { MONITORINFO mi = GetMonitorInfo(*wrapper); - bool top_equals = mi.rcMonitor.top == nonclient.top; - bool bottom_equals = mi.rcMonitor.bottom == nonclient.bottom; - bool left_equals = mi.rcMonitor.left == nonclient.left; - bool right_equals = mi.rcMonitor.right == nonclient.right; + bool top_equals = mi.rcWork.top == nonclient.top; + bool bottom_equals = mi.rcWork.bottom == nonclient.bottom; + bool left_equals = mi.rcWork.left == nonclient.left; + bool right_equals = mi.rcWork.right == nonclient.right; if (!(left_equals && (top_equals || bottom_equals))) nonclient.left += frame_size; if (!(right_equals && (top_equals || bottom_equals))) nonclient.right -= frame_size;