| | |
| | | |
| | | namespace QWK { |
| | | |
| | | AbstractWindowContext::~AbstractWindowContext() { |
| | | delete m_delegate; |
| | | } |
| | | AbstractWindowContext::~AbstractWindowContext() = default; |
| | | |
| | | void AbstractWindowContext::setupWindow(QWindow *window) { |
| | | Q_ASSERT(window); |
| | | if (!window) { |
| | | return; |
| | | } |
| | | m_windowHandle = window; |
| | | } |
| | | |
| | |
| | | } 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)) { |
| | |
| | | // ? |
| | | } |
| | | |
| | | QRegion AbstractWindowContext::hitTestShape() const { |
| | | if (hitTestVisibleShapeDirty) { |
| | | hitTestVisibleShape = {}; |
| | | for (const auto &rect : m_hitTestVisibleRects) { |
| | | hitTestVisibleShape += rect; |
| | | } |
| | | hitTestVisibleShapeDirty = false; |
| | | } |
| | | return hitTestVisibleShape; |
| | | } |
| | | |
| | | } |