From 0debbb890fdbe070ab959da7fd3d058db1fe4d6f Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Fri, 16 Oct 2020 15:53:20 +0800 Subject: [PATCH] Minor tweaks. Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- examples/Win32Demo/widget.cpp | 4 +++- winnativeeventfilter.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/Win32Demo/widget.cpp b/examples/Win32Demo/widget.cpp index 2f0ce70..12ac833 100644 --- a/examples/Win32Demo/widget.cpp +++ b/examples/Win32Demo/widget.cpp @@ -42,7 +42,9 @@ void updateWindow(QWidget *widget) { Q_ASSERT(widget); if (widget->isTopLevel()) { - WinNativeEventFilter::updateWindow(getRawHandle(widget), true, true); + void *handle = getRawHandle(widget); + WinNativeEventFilter::updateFrameMargins(handle); + WinNativeEventFilter::updateWindow(handle, true, true); } } diff --git a/winnativeeventfilter.h b/winnativeeventfilter.h index 99743f7..537f16a 100644 --- a/winnativeeventfilter.h +++ b/winnativeeventfilter.h @@ -143,7 +143,7 @@ public: // On Win10 it's the Acrylic effect. static bool setBlurEffectEnabled(void *handle /* HWND */, const bool enabled = true); - // a + // Thin wrapper of DwmExtendFrameIntoClientArea(). static void updateFrameMargins(void *handle /* HWND */); ///////////////////////////////////////////////