path: root/src/qmltest/qmltest.pro
diff options
authorShawn Rutledge <shawn.rutledge@qt.io>2017-11-30 14:12:17 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-12-05 12:48:58 +0000
commit9b1b87b6eb5fdf2f98e9e380d25d71bce93e7e27 (patch)
treeb82dd1f479ad61068cfb637379e2db5b14a57e71 /src/qmltest/qmltest.pro
parentc34e75e6c9549daa3407eaae0ef4a0ac91802b02 (diff)
grabMouse() and QQWPriv::removeGrabber(): be clear whether mouse or touch
The bug was that a MouseArea could be stuck in pressed state if a touch tap occurred simultaneously on a second MouseArea while the first was held pressed by the actual mouse. QQuickWindowPrivate::setMouseGrabber(QQuickItem *) had too little information to make the right choice in case the given item argument is null. It should not mean ungrab everything: in this use case, the mouse and the touchpoint can be pressing two different MouseAreas, and releasing either one should ungrab only the MouseArea that is being released. However the only place it was called with nullptr was in removeGrabber(), and in that context we are given all the information: which item to ungrab and whether we want to ungrab mouse, touch or both. It's better to have a little code duplication between QQuickItem::grabMouse() and QQuickWindowPrivate::removeGrabber() than to lose this information about which device(s) and Item to ungrab. Task-number: QTBUG-64249 Change-Id: I0710534a05f3ceeb66105a03ab0f32a61df8a522 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/qmltest/qmltest.pro')
0 files changed, 0 insertions, 0 deletions