diff options
author | Volker Hilsheimer <[email protected]> | 2023-12-20 16:51:41 +0100 |
---|---|---|
committer | Volker Hilsheimer <[email protected]> | 2023-12-20 20:46:39 +0100 |
commit | 4f95e66f940c3a6c72f51c2428620c09e30bbd0b (patch) | |
tree | 45f6acb973f8bba35bf83823610abea1fb7944ef /src/plugins/platforms/wasm/qwasmdom.cpp | |
parent | 2a95ecf7e81fbdcfad50f8a1dd5c62b120e2ec27 (diff) |
QWidget: deliver DragLeave events symmetrically
If a widget received a DragEnter event that it didn't accept, then the
UnderMouse widget attribute gets set. But the drag manager never got a
drag target, so the DragLeave event was never delivered, leaving the
UnderMouse attribute set incorrectly.
We always need to send DragLeave events to the receiver, even if the
DragEnter or DragMove was not accepted. Otherwise we are not in balance,
and the UnderMouse attribute will remain set.
This is a change of behavior and a very old bug, so only fixing this in
unreleased branches. Test case added to verify that explicitly generated
drag events result in the correct enter/leave events.
[ChangeLog][QtWidgets][QWidget] DragLeave events are now always sent to
the widget the mouse is leaving, even if it didn't accept the DragEnter
event.
Fixes: QTBUG-50403
Pick-to: 6.7
Change-Id: I5eae49da000fb4fea81f1767f0e73a06a6b78975
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Christian Ehrlicher <[email protected]>
Reviewed-by: Axel Spoerl <[email protected]>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmdom.cpp')
0 files changed, 0 insertions, 0 deletions