Sine Striker
2023-12-06 a0bede6ff6a700a6eea9702c49d378f07de22f63
src/core/contexts/abstractwindowcontext_p.h
@@ -16,16 +16,14 @@
    class QWK_CORE_EXPORT AbstractWindowContext : public QObject {
        Q_OBJECT
    public:
        inline AbstractWindowContext(QWindow *window, WindowItemDelegate *delegate)
            : m_windowHandle(window), m_delegate(delegate) {
        }
        AbstractWindowContext(QObject *host, WindowItemDelegate *delegate);
        ~AbstractWindowContext() override;
    public:
        virtual bool setup() = 0;
        inline QObject *host() const;
        inline QWindow *window() const;
        void setupWindow(QWindow *window);
        inline bool isHitTestVisible(QObject *obj) const;
        bool setHitTestVisible(QObject *obj, bool visible);
@@ -41,10 +39,12 @@
        QRegion hitTestShape() const;
        bool isInSystemButtons(const QPoint &pos, CoreWindowAgent::SystemButton *button) const;
        bool isInTitleBarDraggableArea(const QPoint &pos) const;
    protected:
        QWindow *m_windowHandle;
        QObject *m_host;
        std::unique_ptr<WindowItemDelegate> m_delegate;
        QWindow *m_windowHandle;
        QSet<QObject *> m_hitTestVisibleItems;
        QList<QRect> m_hitTestVisibleRects;
@@ -57,6 +57,10 @@
        mutable QRegion hitTestVisibleShape;
    };
    inline QObject *AbstractWindowContext::host() const {
        return m_host;
    }
    inline QWindow *AbstractWindowContext::window() const {
        return m_windowHandle;
    }