aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgatlastexture.cpp
diff options
context:
space:
mode:
authorFilippo Cucchetto <f.cucchetto@asem.it>2016-04-14 10:48:25 +0200
committerFilippo Cucchetto <filippocucchetto@gmail.com>2016-04-19 16:12:17 +0000
commite1400b5b4d8311769ad3b9f631479ee2b0271197 (patch)
tree7ec3196d596f72c81aa48110d7977df83dfa3016 /src/quick/scenegraph/util/qsgatlastexture.cpp
parentfc22938dfc7b4c09f76913ac62e1f8ba345eccaf (diff)
Fixed MouseArea threshold with preventStealing
When preventStealing is true both keepMouseGrab() and d->stealMouse are true. This in turn enable the dragging immediately since the condition "keepMouseGrab() && d->stealMouse && !d->drag->active()" is true. Conversely when preventStealing is false the dragging is enabled in the next move event since keepMouseGrab() and d->stealMouse are set true inside the last "if" "!keepMouseGrab() && ...check threshold..". This patch adds a new boolean flag for storing if we detected a drag motion (so we exceeded the threshold) and enable the dragging iff this flag is true. With this change: - if preventStealing is true (and so keepMouseGrab() and d->stealMouse) the additional d->overThresHold prevent the start of dragging. At the same time the last if (!keepMouseGrab()) cannot be executed since keepMouseGrab is true and we still check for the threshold being exceeded. - if preventStealing is false, we still check for exceeding the threshold and if this happen we enter in the last "if" since !keepMousegrab() && d->overThreshold is true taking the mouseGrab as without this patch Task-number: QTBUG-52534 Change-Id: I2b14d3048b6f8223c90ce5e2fd26e7ca706cb56a Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/quick/scenegraph/util/qsgatlastexture.cpp')
0 files changed, 0 insertions, 0 deletions