summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandxdgshellv6integration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshellv6integration.cpp')
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6integration.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshellv6integration.cpp b/src/compositor/extensions/qwaylandxdgshellv6integration.cpp
index 66dbc6841..e424af193 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6integration.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv6integration.cpp
@@ -77,7 +77,19 @@ XdgToplevelV6Integration::XdgToplevelV6Integration(QWaylandQuickShellSurfaceItem
connect(m_toplevel, &QObject::destroyed, this, &XdgToplevelV6Integration::handleToplevelDestroyed);
}
-bool XdgToplevelV6Integration::mouseMoveEvent(QMouseEvent *event)
+bool XdgToplevelV6Integration::eventFilter(QObject *object, QEvent *event)
+{
+ if (event->type() == QEvent::MouseMove) {
+ QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
+ return filterMouseMoveEvent(mouseEvent);
+ } else if (event->type() == QEvent::MouseButtonRelease) {
+ QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
+ return filterMouseReleaseEvent(mouseEvent);
+ }
+ return QWaylandQuickShellIntegration::eventFilter(object, event);
+}
+
+bool XdgToplevelV6Integration::filterMouseMoveEvent(QMouseEvent *event)
{
if (grabberState == GrabberState::Resize) {
Q_ASSERT(resizeState.seat == m_item->compositor()->seatFor(event));
@@ -105,7 +117,7 @@ bool XdgToplevelV6Integration::mouseMoveEvent(QMouseEvent *event)
return false;
}
-bool XdgToplevelV6Integration::mouseReleaseEvent(QMouseEvent *event)
+bool XdgToplevelV6Integration::filterMouseReleaseEvent(QMouseEvent *event)
{
Q_UNUSED(event);