Sine Striker
2023-12-17 52a662ed17db6c3a3ff2050d61bc2e06ea21b056
src/core/contexts/abstractwindowcontext_p.h
@@ -36,6 +36,11 @@
        inline QObject *titleBar() const;
        bool setTitleBar(QObject *obj);
#ifdef Q_OS_MAC
        inline QRect systemButtonArea() const;
        void setSystemButtonArea(const QRect &rect);
#endif
        bool isInSystemButtons(const QPoint &pos, WindowAgentBase::SystemButton *button) const;
        bool isInTitleBarDraggableArea(const QPoint &pos) const;
@@ -46,6 +51,7 @@
            ShowSystemMenuHook,
            DefaultColorsHook,
            DrawWindows10BorderHook, // Only works on Windows 10
            SystemButtonAreaChangedHook, // Only works on Mac
        };
        virtual void virtual_hook(int id, void *data);
@@ -60,6 +66,9 @@
        QWindow *m_windowHandle{};
        QSet<const QObject *> m_hitTestVisibleItems;
#ifdef Q_OS_MAC
        QRect m_systemButtonArea;
#endif
        QObject *m_titleBar{};
        std::array<QObject *, WindowAgentBase::NumSystemButton> m_systemButtons{};
@@ -90,6 +99,12 @@
        return m_titleBar;
    }
#ifdef Q_OS_MAC
    inline QRect AbstractWindowContext::systemButtonArea() const {
        return m_systemButtonArea;
    }
#endif
}
#endif // ABSTRACTWINDOWCONTEXT_P_H