diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-09-15 06:46:54 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-09-19 14:34:06 +0000 |
commit | 541a7a8e785476e2e93f88f770715f25ce7e6dc8 (patch) | |
tree | 2d988212f8f4faa4feb43d6956048c3c1b5801c7 /src/quicktemplates2/qquickoverlay.cpp | |
parent | 60bbe9d5157c50a35f891105819aaf851eb136bc (diff) |
Drawer: fix drag to close from the outside on touch
Set mouseGrabberPopup in QQuickOverlay::childMouseEventFilter() the
same way it is set in QQuickOverlay::mousePressEvent() to ensure that
the consequent mouse move events are routed to the appropriate popup.
This worked with "genuine" mouse move events that were caught by the
same child mouse event filter and that way routed to the appropriate
popup, but not with "synthesized" mouse move events that are caught
by QQuickOverlay::mousePressEvent() instead.
Change-Id: Ic59afd85e55c13ebec482bc4dc534accd1f92b2c
Task-number: QTBUG-56010
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickoverlay.cpp')
-rw-r--r-- | src/quicktemplates2/qquickoverlay.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp index c6e34ee2..a1fdffb3 100644 --- a/src/quicktemplates2/qquickoverlay.cpp +++ b/src/quicktemplates2/qquickoverlay.cpp @@ -404,7 +404,11 @@ bool QQuickOverlay::childMouseEventFilter(QQuickItem *item, QEvent *event) switch (event->type()) { case QEvent::MouseButtonPress: emit pressed(); - return popup->overlayEvent(item, event); + if (popup->overlayEvent(item, event)) { + d->mouseGrabberPopup = popup; + return true; + } + break; case QEvent::MouseMove: return popup->overlayEvent(item, event); case QEvent::MouseButtonRelease: |