From a51b5688e1c33d3ce96b48c869603b00f908f513 Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周三, 13 12月 2023 04:16:37 +0800
Subject: [PATCH] Make better code structure for border handlers

---
 src/quick/quickwindowagent.cpp |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/quick/quickwindowagent.cpp b/src/quick/quickwindowagent.cpp
index 2bc9bca..9422f65 100644
--- a/src/quick/quickwindowagent.cpp
+++ b/src/quick/quickwindowagent.cpp
@@ -1,8 +1,10 @@
 #include "quickwindowagent.h"
 #include "quickwindowagent_p.h"
-#include "quickitemdelegate_p.h"
 
 #include <QtQuick/QQuickWindow>
+#include <QtQuick/private/qquickanchors_p.h>
+
+#include "quickitemdelegate_p.h"
 
 namespace QWK {
 
@@ -34,9 +36,13 @@
         }
 
         if (!d->setup(window, new QuickItemDelegate())) {
-            return true;
+            return false;
         }
         d->hostWindow = window;
+
+#ifdef Q_OS_WINDOWS
+        d->setupWindows10BorderWorkaround();
+#endif
         return true;
     }
 
@@ -86,4 +92,4 @@
         d.init();
     }
 
-}
+}
\ No newline at end of file

--
Gitblit v1.9.1