wip
Zhao Yuhang
2023-12-02 51039917996909284fbc2d776a9b8f71fe5e6f9a
src/core/contexts/abstractwindowcontext_p.h
@@ -12,11 +12,14 @@
    class QWK_CORE_EXPORT AbstractWindowContext : public QObject {
        Q_OBJECT
        Q_DISABLE_COPY(AbstractWindowContext)
    public:
        inline AbstractWindowContext(QWindow *window, WindowItemDelegate *delegate)
            : m_windowHandle(window), m_delegate(delegate) {
        inline AbstractWindowContext(QWindow *window, WindowItemDelegatePtr delegate)
            : m_windowHandle(window), m_delegate(std::move(delegate))
        {
        }
        ~AbstractWindowContext();
        ~AbstractWindowContext() override;
    public:
        virtual bool setup() = 0;
@@ -38,13 +41,13 @@
    protected:
        QWindow *m_windowHandle;
        WindowItemDelegate *m_delegate;
        WindowItemDelegatePtr m_delegate;
        QSet<QObject *> m_hitTestVisibleItems;
        QList<QRect> m_hitTestVisibleRects;
        QObject *m_titleBar{};
        QObject *m_systemButtons[CoreWindowAgent::NumSystemButton]{};
        std::array<QObject *, CoreWindowAgent::NumSystemButton> m_systemButtons{};
        mutable bool hitTestVisibleShapeDirty{};
        mutable QPolygon hitTestVisibleShape;
@@ -67,6 +70,8 @@
        return m_titleBar;
    }
    using WindowContextPtr = std::shared_ptr<AbstractWindowContext>;
}
#endif // ABSTRACTWINDOWCONTEXT_P_H