Skip to content

Commit

Permalink
Merge branch 'jb34439' into 'mer-stable'
Browse files Browse the repository at this point in the history
[qtdeclarative] Fix Flickable state being reset when it replays a delayed press. Fixes JB#34439

Ignore mouseUngrabEvents() triggered by giving mouse grab to a child
item when replaying a delayed press event.

Change-Id: I6c8db61167e21bf10d533b17f7cc65e4754bd432

See merge request !4
  • Loading branch information
adenexter committed Mar 11, 2016
2 parents 69670fb + 4806184 commit 392350e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/quick/items/qquickflickable.cpp
Expand Up @@ -1455,11 +1455,11 @@ void QQuickFlickablePrivate::replayDelayedPress()

// If we have the grab, release before delivering the event
if (QQuickWindow *w = q->window()) {
replayingPressEvent = true;
if (w->mouseGrabberItem() == q)
q->ungrabMouse();

// Use the event handler that will take care of finding the proper item to propagate the event
replayingPressEvent = true;
QCoreApplication::sendEvent(w, mouseEvent.data());
replayingPressEvent = false;
}
Expand Down Expand Up @@ -2091,7 +2091,7 @@ bool QQuickFlickable::yflick() const
void QQuickFlickable::mouseUngrabEvent()
{
Q_D(QQuickFlickable);
if (d->pressed) {
if (d->pressed && !d->replayingPressEvent) {
// if our mouse grab has been removed (probably by another Flickable),
// fix our state
d->clearDelayedPress();
Expand Down

0 comments on commit 392350e

Please sign in to comment.