From c302bf331cf853feaea0be4e10c30cd50a1e0323 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Mon, 26 Oct 2020 18:12:51 +0800 Subject: [PATCH] Fix regression. Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- winnativeeventfilter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winnativeeventfilter.cpp b/winnativeeventfilter.cpp index 767640e..6af9966 100644 --- a/winnativeeventfilter.cpp +++ b/winnativeeventfilter.cpp @@ -982,7 +982,9 @@ void UpdateFrameMarginsForWindow(const HWND handle) // the client area in WM_NCCALCSIZE so we won't see it due to // it's covered by the client area (in other words, it's still // there, we just can't see it). - margins.cyTopHeight = 1; + if (IsDwmCompositionEnabled() && !IsMaximized(handle) && !IsFullScreen(handle)) { + margins.cyTopHeight = 1; + } if (shouldUseNativeTitleBar() || dontExtendFrame()) { // If we are going to use the native title bar, // we should use the original window frame as well.