summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandxdgshellv5integration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshellv5integration.cpp')
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5integration.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshellv5integration.cpp b/src/compositor/extensions/qwaylandxdgshellv5integration.cpp
index 1d63632a3..4907a0611 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5integration.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv5integration.cpp
@@ -82,7 +82,19 @@ XdgShellV5Integration::~XdgShellV5Integration()
m_item->setSurface(nullptr);
}
-bool XdgShellV5Integration::mouseMoveEvent(QMouseEvent *event)
+bool XdgShellV5Integration::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 XdgShellV5Integration::filterMouseMoveEvent(QMouseEvent *event)
{
if (grabberState == GrabberState::Resize) {
Q_ASSERT(resizeState.seat == m_item->compositor()->seatFor(event));
@@ -110,7 +122,7 @@ bool XdgShellV5Integration::mouseMoveEvent(QMouseEvent *event)
return false;
}
-bool XdgShellV5Integration::mouseReleaseEvent(QMouseEvent *event)
+bool XdgShellV5Integration::filterMouseReleaseEvent(QMouseEvent *event)
{
Q_UNUSED(event);