From 0b84006b141c32052515fbffd055f764cf689605 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Thu, 7 May 2020 17:45:22 +0800 Subject: [PATCH] Minor tweaks. Maybe fix one issue of #9 Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- winnativeeventfilter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winnativeeventfilter.cpp b/winnativeeventfilter.cpp index 812ad3e..2dfdbd4 100644 --- a/winnativeeventfilter.cpp +++ b/winnativeeventfilter.cpp @@ -903,6 +903,8 @@ bool WinNativeEventFilter::nativeEventFilter(const QByteArray &eventType, m_lpSetLayeredWindowAttributes(msg->hwnd, RGB(255, 0, 255), 0, LWA_COLORKEY); } + // Bring our frame shadow back through DWM, don't draw it manually. + UpdateFrameMarginsForWindow(msg->hwnd); // Trigger a frame change event to let us enter the WM_NCCALCSIZE // message to remove our title bar as early as possible. updateWindow(msg->hwnd, true, false); @@ -1427,7 +1429,6 @@ bool WinNativeEventFilter::nativeEventFilter(const QByteArray &eventType, *result = ret; return true; } - case WM_ACTIVATE: case WM_DWMCOMPOSITIONCHANGED: // DWM won't draw the frame shadow if the window doesn't have a // frame. So extend the window frame a bit to make sure we still