From 21baa3eea8db916c8cf25db57a020faa2cf6914b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 22 Sep 2024 00:17:26 +0300 Subject: [PATCH] Make InternalWindowEventFilter::pointerEvent() exclusive If an internal window doesn't accept the event, we should still stop traversing the event filter chain because we know that the internal window is the only receiver of pointer events. --- src/input.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index dda4b9940c..88fd385477 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1249,14 +1249,14 @@ public: // the handle can be nullptr if the tooltip gets closed while focus updates are blocked return false; } - const bool isAccepted = QWindowSystemInterface::handleMouseEvent(internal, - event->position() - internal->position(), - event->globalPosition(), - event->buttons(), - event->button(), - event->type(), - event->modifiers()); - return isAccepted; + QWindowSystemInterface::handleMouseEvent(internal, + event->position() - internal->position(), + event->globalPosition(), + event->buttons(), + event->button(), + event->type(), + event->modifiers()); + return true; } bool wheelEvent(WheelEvent *event) override {