Skip to content

Unset mouseGrabberPopup if it's removed from children

David Redondo requested to merge davidre/qtquickcontrols2:kde/5.15 into kde/5.15

The mouseGrabberPopup is supposed to be unset in handleRelease, however when the exit transition of the mouseGrabberPopup (that closed itself on button press) finishes before the release event is delivered, it unparents itself from the overlay (see QQuickPopupPrivate::finalizeExitTransition) and the overlay sets itself invisible if there is nothing else visible in it. Because the overlay is not visible it handles no events anymore and the release is missed and the grabber is never unset. When opening another non-modal popup the overlay then will continue forwarding the events to now invisible popup. So when the overlay loses the currently grabbing popup as a child we need to reset mouseGrabberPopup.

Fixes: QTBUG-95259 Change-Id: I3c832d47f3cee216b81ef1b5cb7dd77bf4149991 Reviewed-by: Mitch Curtis (adapted from commit d07ee1345acd8100fa5cbb7f05c0aaf5f87f4cae)

(cherry picked from commit 1a59ef42)

Edited by David Redondo

Merge request reports