From 862cbfe3032b1f71977fb66af7bd87645ec3eeac Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 摹曛, 21 12月 2023 23:27:04 +0800
Subject: [PATCH] minor tweaks

---
 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 5575218..4d1a6ff 100644
--- a/src/core/contexts/win32windowcontext.cpp
+++ b/src/core/contexts/win32windowcontext.cpp
@@ -712,6 +712,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