[qt/qt/qtdeclarative]: Summary of bulk changes made

KDE Git Services - Bulk Change <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git repository change summary for qt/qt/qtdeclarative
Pushed by mirror-service into branch 'dev'.
Changed from bc366914ed80627eaf5aec9e903de017c500cf08 to f9c52b0b7e2783c12a69ea950267e94d7a160fae
Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository.

This change contains the following new commits:

Git commit f9c52b0b7e2783c12a69ea950267e94d7a160fae by Oliver Eftevaag on 19/08/2026 at 00:38..
QQuickWindow: mark pointer events accepted when a grabber claims them

When a Popup with popupType: Popup.Window contains an item with a
DragHandler, dragging the item could make it teleport far off-screen
on the very first move after the drag threshold was crossed.

The native mouse/keyboard grab correctly stays on the main application
window while the popup is open (QQuickPopupWindowPrivate::setVisible),
and events for points inside the popup are delivered to the popup
window's own delivery agent. However, QWindow::mousePressEvent()/
mouseMoveEvent() unconditionally ignore() the event, and Quick's items
and handlers don't reliably call the whole-event QEvent::accept()
either -- that's incidental to their own fast paths (e.g.
QQuickDragHandler only calls it when its wantsPointerEvent() check
happens to pass for that particular delivery). So even after
DragHandler took the exclusive grab on a point inside the popup
window's delivery agent, the QMouseEvent as a whole was left ignored.

QWindowPrivate::forwardToPopup() relies on that flag to decide whether
an event already handled by the topmost popup window should still be
forwarded on to the window(s) behind it (the same mechanism the
existing modal-popup-press and tablet-event handling in this file
already accept() for). With isAccepted() false, move events kept being
forwarded past the popup window and reached the main window's delivery
agent too, which localized the same scenePosition() against the main
window's coordinate system instead of the popup's -- producing a delta
equal to the popup window's on-screen offset and teleporting the
dragged item off-screen.

Reconcile the legacy whole-event accepted flag with Quick's actual,
authoritative per-point grab state right before clearGrabbers() runs:
if any point in the event has an exclusive grabber, flag the event
accepted, so forwardToPopup() and any other caller outside QtQuick
that still inspects QEvent::isAccepted() get a meaningful answer.

Tablet events are excluded via isTabletEvent(): qtbase uses their
isAccepted() for an unrelated purpose, gating synthesis of a
compatibility QMouseEvent for handlers (e.g. QQuickMouseArea) that
don't understand QTabletEvent directly. Accepting on grab alone would
suppress that synthesis and break tablet dragging, so tablet events
are left to the dedicated handling further below instead.

Fixes: QTBUG-147603
Pick-to: 6.12 6.11 6.8
Change-Id: Ida8685f7a9fde12442f988ea073ba6c59d2ef6a3
Reviewed-by: Shawn Rutledge <[email protected]>
https://invent.kde.org/qt/qt/qtdeclarative/-/commit/f9c52b0b7e2783c12a69ea950267e94d7a160fae
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.