Sine Striker
2023-12-02 499afac952920595e6c3d4f94806427f894c7674
src/core/contexts/abstractwindowcontext_p.h
@@ -1,6 +1,8 @@
#ifndef ABSTRACTWINDOWCONTEXT_P_H
#define ABSTRACTWINDOWCONTEXT_P_H
#include <array>
#include <QtCore/QSet>
#include <QtGui/QWindow>
#include <QtGui/QPolygon>
@@ -16,7 +18,7 @@
        inline AbstractWindowContext(QWindow *window, WindowItemDelegate *delegate)
            : m_windowHandle(window), m_delegate(delegate) {
        }
        ~AbstractWindowContext();
        ~AbstractWindowContext() override;
    public:
        virtual bool setup() = 0;
@@ -36,6 +38,8 @@
        void showSystemMenu(const QPoint &pos);
        QRegion hitTestShape() const;
    protected:
        QWindow *m_windowHandle;
        WindowItemDelegate *m_delegate;
@@ -44,10 +48,11 @@
        QList<QRect> m_hitTestVisibleRects;
        QObject *m_titleBar{};
        QObject *m_systemButtons[CoreWindowAgent::NumSystemButton]{};
        std::array<QObject *, CoreWindowAgent::NumSystemButton> m_systemButtons{};
        // Cached shape
        mutable bool hitTestVisibleShapeDirty{};
        mutable QPolygon hitTestVisibleShape;
        mutable QRegion hitTestVisibleShape;
    };
    inline QWindow *AbstractWindowContext::window() const {