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,6 +39,7 @@
        } else {
            m_hitTestVisibleRects.removeAll(rect);
        }
        hitTestVisibleShapeDirty = true;
        return true;
    }
@@ -72,4 +75,15 @@
        // ?
    }
    QRegion AbstractWindowContext::hitTestShape() const {
        if (hitTestVisibleShapeDirty) {
            hitTestVisibleShape = {};
            for (const auto &rect : m_hitTestVisibleRects) {
                hitTestVisibleShape += rect;
            }
            hitTestVisibleShapeDirty = false;
        }
        return hitTestVisibleShape;
    }
}