Sine Striker
2023-12-02 499afac952920595e6c3d4f94806427f894c7674
src/core/contexts/abstractwindowcontext.cpp
@@ -2,7 +2,9 @@
namespace QWK {
    AbstractWindowContext::~AbstractWindowContext() = default;
    AbstractWindowContext::~AbstractWindowContext() {
        delete m_delegate;
    }
    void AbstractWindowContext::setupWindow(QWindow *window) {
        Q_ASSERT(window);
@@ -37,11 +39,12 @@
        } else {
            m_hitTestVisibleRects.removeAll(rect);
        }
        hitTestVisibleShapeDirty = true;
        return true;
    }
    bool AbstractWindowContext::setSystemButton(CoreWindowAgent::SystemButton button,
                                                     QObject *obj) {
                                                QObject *obj) {
        Q_ASSERT(obj);
        Q_ASSERT(button != CoreWindowAgent::Unknown);
        if (!obj || (button == CoreWindowAgent::Unknown)) {
@@ -72,4 +75,15 @@
        // ?
    }
    QRegion AbstractWindowContext::hitTestShape() const {
        if (hitTestVisibleShapeDirty) {
            hitTestVisibleShape = {};
            for (const auto &rect : m_hitTestVisibleRects) {
                hitTestVisibleShape += rect;
            }
            hitTestVisibleShapeDirty = false;
        }
        return hitTestVisibleShape;
    }
}