From a9c357c40d29e9a7ea59ffa80214657ef58c7dbe Mon Sep 17 00:00:00 2001
From: Zhao Yuhang <2546789017@qq.com>
Date: 周一, 27 5月 2024 23:18:42 +0800
Subject: [PATCH] Fix typo

---
 qmsetup                                  |    2 +-
 src/core/contexts/win32windowcontext.cpp |    8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/qmsetup b/qmsetup
index 5397c13..546419e 160000
--- a/qmsetup
+++ b/qmsetup
@@ -1 +1 @@
-Subproject commit 5397c13aa8f2c489d865648f09df3c87351c3d83
+Subproject commit 546419e65270b709b112e92baddd53f1dc834a67
diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp
index 07b835f..3fa910e 100644
--- a/src/core/contexts/win32windowcontext.cpp
+++ b/src/core/contexts/win32windowcontext.cpp
@@ -81,6 +81,8 @@
 
     static void setInternalWindowFrameMargins(QWindow *window, const QMargins &margins) {
         const QVariant marginsVar = QVariant::fromValue(margins);
+
+        // TODO: Add comments
         window->setProperty("_q_windowsCustomMargins", marginsVar);
 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
         if (QPlatformWindow *platformWindow = window->handle()) {
@@ -1956,9 +1958,9 @@
             // that's also how most applications customize their title bars on Windows. It's
             // totally OK but since we want to preserve as much original frame as possible,
             // we can't use that solution.
-            const LRESULT hitTestResult = ::DefWindowProcW(hWnd, WM_NCCALCSIZE, wParam, lParam);
-            if ((hitTestResult != HTERROR) && (hitTestResult != HTNOWHERE)) {
-                *result = hitTestResult;
+            const LRESULT originalResult = ::DefWindowProcW(hWnd, WM_NCCALCSIZE, wParam, lParam);
+            if (originalResult != 0) {
+                *result = originalResult;
                 return true;
             }
             // Re-apply the original top from before the size of the default frame was

--
Gitblit v1.9.1