From 78188cc33a2e96f519832a85d4805791e0a0d886 Mon Sep 17 00:00:00 2001
From: Zhao Yuhang <2546789017@qq.com>
Date: 摹曛, 21 12月 2023 22:05:46 +0800
Subject: [PATCH] fix shadow frame below win10

---
 src/core/contexts/win32windowcontext.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp
index 953186c..3fc2ee3 100644
--- a/src/core/contexts/win32windowcontext.cpp
+++ b/src/core/contexts/win32windowcontext.cpp
@@ -1200,6 +1200,11 @@
         auto winId = m_windowHandle->winId();
         auto hWnd = reinterpret_cast<HWND>(winId);
 
+        if (!isWin10OrGreater()) {
+            static constexpr const MARGINS margins = {1, 1, 1, 1};
+            DynamicApis::instance().pDwmExtendFrameIntoClientArea(hWnd, &margins);
+        }
+
 #if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
         for (const auto attr : {
                  _DWMWA_USE_IMMERSIVE_DARK_MODE_BEFORE_20H1,

--
Gitblit v1.9.1