From 7d747f3bb139d2c01aee61b809d0929e8e908a2d Mon Sep 17 00:00:00 2001
From: Zhao Yuhang <2546789017@qq.com>
Date: 周六, 23 12月 2023 17:41:00 +0800
Subject: [PATCH] update qmsetup

---
 src/widgets/widgetwindowagent_win.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/widgets/widgetwindowagent_win.cpp b/src/widgets/widgetwindowagent_win.cpp
index 1305ba7..fb9dce3 100644
--- a/src/widgets/widgetwindowagent_win.cpp
+++ b/src/widgets/widgetwindowagent_win.cpp
@@ -3,10 +3,12 @@
 #include <QtGui/QPainter>
 
 #include <QWKCore/qwindowkit_windows.h>
+#include <QWKCore/qwkconfig.h>
 #include <QWKCore/private/nativeeventfilter_p.h>
 
 namespace QWK {
 
+#if QWINDOWKIT_CONFIG(ENABLE_WINDOWS_SYSTEM_BORDER)
     class WidgetBorderHandler : public QObject, public NativeEventFilter {
     public:
         explicit WidgetBorderHandler(QWidget *widget, AbstractWindowContext *ctx)
@@ -105,13 +107,16 @@
         QWidget *widget;
         AbstractWindowContext *ctx;
     };
+#endif
 
     void WidgetWindowAgentPrivate::setupWindows10BorderWorkaround() {
+#if QWINDOWKIT_CONFIG(ENABLE_WINDOWS_SYSTEM_BORDER)
         // Install painting hook
         auto ctx = context.get();
         if (ctx->property("needBorderPainter").toBool()) {
             std::ignore = new WidgetBorderHandler(hostWidget, ctx);
         }
+#endif
     }
 
 }

--
Gitblit v1.9.1