From ffa1628f38672debd59d5ccd5ab7000560273f63 Mon Sep 17 00:00:00 2001 From: Stefan Merettig Date: Thu, 2 Apr 2015 17:10:26 +0200 Subject: [PATCH] Screen grabber: Make sure the flyout is hidden on leave When the user moved from right to left in moderate speed, the flyout didn't get the mouse leave event. --- src/widget/tool/flyoutoverlaywidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/tool/flyoutoverlaywidget.cpp b/src/widget/tool/flyoutoverlaywidget.cpp index af0951a57..3b2bdf2b7 100644 --- a/src/widget/tool/flyoutoverlaywidget.cpp +++ b/src/widget/tool/flyoutoverlaywidget.cpp @@ -106,7 +106,6 @@ void FlyoutOverlayWidget::animateHide() void FlyoutOverlayWidget::finishedAnimation() { bool hide = (animation->direction() == QAbstractAnimation::Backward); - setAttribute(Qt::WA_TransparentForMouseEvents, hide); // Delay it by a few frames to let the system catch up on rendering if (hide) @@ -116,6 +115,7 @@ void FlyoutOverlayWidget::finishedAnimation() void FlyoutOverlayWidget::startAnimation(bool forward) { + setAttribute(Qt::WA_TransparentForMouseEvents, !forward); animation->setDirection(forward ? QAbstractAnimation::Forward : QAbstractAnimation::Backward); animation->start(); animation->setCurrentTime(animation->duration() * percent);