From 76924a335f40a0c3cc13805b4cb9429c336d33ca Mon Sep 17 00:00:00 2001
From: SineStriker <trueful@163.com>
Date: 周五, 29 12月 2023 11:34:22 +0800
Subject: [PATCH] Optimize system button area APIs

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

diff --git a/src/core/contexts/abstractwindowcontext_p.h b/src/core/contexts/abstractwindowcontext_p.h
index 04651ad..f375b83 100644
--- a/src/core/contexts/abstractwindowcontext_p.h
+++ b/src/core/contexts/abstractwindowcontext_p.h
@@ -50,8 +50,8 @@
         bool setTitleBar(QObject *obj);
 
 #ifdef Q_OS_MAC
-        inline QRect systemButtonArea() const;
-        void setSystemButtonArea(const QRect &rect);
+        inline ScreenRectCallback systemButtonAreaCallback() const;
+        void setSystemButtonAreaCallback(const ScreenRectCallback &callback);
 #endif
 
         bool isInSystemButtons(const QPoint &pos, WindowAgentBase::SystemButton *button) const;
@@ -88,7 +88,7 @@
 
         QSet<const QObject *> m_hitTestVisibleItems;
 #ifdef Q_OS_MAC
-        QRect m_systemButtonArea;
+        ScreenRectCallback m_systemButtonAreaCallback;
 #endif
 
         QObject *m_titleBar{};
@@ -126,8 +126,8 @@
     }
 
 #ifdef Q_OS_MAC
-    inline QRect AbstractWindowContext::systemButtonArea() const {
-        return m_systemButtonArea;
+    inline ScreenRectCallback AbstractWindowContext::systemButtonAreaCallback() const {
+        return m_systemButtonAreaCallback;
     }
 #endif
 

--
Gitblit v1.9.1