From 1fab480dc53e910a614d5d836993adb743d59352 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周六, 16 12月 2023 20:52:30 +0800 Subject: [PATCH] Remove redundant API --- src/core/contexts/abstractwindowcontext.cpp | 29 ----------------------------- 1 files changed, 0 insertions(+), 29 deletions(-) diff --git a/src/core/contexts/abstractwindowcontext.cpp b/src/core/contexts/abstractwindowcontext.cpp index 3b2340f..96f2935 100644 --- a/src/core/contexts/abstractwindowcontext.cpp +++ b/src/core/contexts/abstractwindowcontext.cpp @@ -48,21 +48,6 @@ return true; } - bool AbstractWindowContext::setHitTestVisible(const QRect &rect, bool visible) { - Q_ASSERT(rect.isValid()); - if (!rect.isValid()) { - return false; - } - - if (visible) { - m_hitTestVisibleRects.append(rect); - } else { - m_hitTestVisibleRects.removeAll(rect); - } - hitTestVisibleShapeDirty = true; - return true; - } - bool AbstractWindowContext::setSystemButton(WindowAgentBase::SystemButton button, QObject *obj) { Q_ASSERT(obj); @@ -89,17 +74,6 @@ } m_titleBar = item; return true; - } - - QRegion AbstractWindowContext::hitTestShape() const { - if (hitTestVisibleShapeDirty) { - hitTestVisibleShape = {}; - for (const auto &rect : m_hitTestVisibleRects) { - hitTestVisibleShape += rect; - } - hitTestVisibleShapeDirty = false; - } - return hitTestVisibleShape; } bool AbstractWindowContext::isInSystemButtons(const QPoint &pos, @@ -157,9 +131,6 @@ } } - if (!m_hitTestVisibleRects.isEmpty() && hitTestShape().contains(pos)) { - return false; - } return true; } -- Gitblit v1.9.1