From 6b2d31247dc2c2804e571b31a71c8a423c1db9d4 Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周二, 26 12月 2023 01:44:03 +0800
Subject: [PATCH] Totally fix top border issue on Win10 for QtWidgets

---
 src/core/contexts/abstractwindowcontext_p.h |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/core/contexts/abstractwindowcontext_p.h b/src/core/contexts/abstractwindowcontext_p.h
index ec4937a..04651ad 100644
--- a/src/core/contexts/abstractwindowcontext_p.h
+++ b/src/core/contexts/abstractwindowcontext_p.h
@@ -40,9 +40,6 @@
         inline QWindow *window() const;
         inline WindowItemDelegate *delegate() const;
 
-        inline QVariant windowAttribute(const QString &key) const;
-        bool setWindowAttribute(const QString &key, const QVariant &attribute);
-
         inline bool isHitTestVisible(const QObject *obj) const;
         bool setHitTestVisible(const QObject *obj, bool visible);
 
@@ -75,6 +72,9 @@
 
         void showSystemMenu(const QPoint &pos);
         void notifyWinIdChange();
+
+        virtual QVariant windowAttribute(const QString &key) const;
+        virtual bool setWindowAttribute(const QString &key, const QVariant &attribute);
 
     protected:
         virtual void winIdChanged() = 0;
@@ -110,10 +110,6 @@
 
     inline WindowItemDelegate *AbstractWindowContext::delegate() const {
         return m_delegate.get();
-    }
-
-    inline QVariant AbstractWindowContext::windowAttribute(const QString &key) const {
-        return m_windowAttributes.value(key);
     }
 
     inline bool AbstractWindowContext::isHitTestVisible(const QObject *obj) const {

--
Gitblit v1.9.1