From 5469558c1a492bdcaa9f6319d8dc60876b2007fd Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Thu, 29 Aug 2019 11:48:53 +0300 Subject: [PATCH] [effects/slidingpopups] Don't start animation if there is no slide edge Summary: Given that slide in/out animation duration is not initialized when slide location is NoEdge, assert statement will be triggered in slideIn(). Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D23564 --- effects/slidingpopups/slidingpopups.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp index 503b8cddd3..a98dd1cdff 100644 --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -400,23 +400,25 @@ void SlidingPopupsEffect::setupInternalWindowSlide(EffectWindow *w) if (!slideProperty.isValid()) { return; } - AnimationData &animData = m_animationsData[w]; + Location location; switch (slideProperty.value()) { case KWindowEffects::BottomEdge: - animData.location = Location::Bottom; + location = Location::Bottom; break; case KWindowEffects::TopEdge: - animData.location = Location::Top; + location = Location::Top; break; case KWindowEffects::RightEdge: - animData.location = Location::Right; + location = Location::Right; break; case KWindowEffects::LeftEdge: - animData.location = Location::Left; + location = Location::Left; break; default: return; } + AnimationData &animData = m_animationsData[w]; + animData.location = location; bool intOk = false; animData.offset = internal->property("kwin_slide_offset").toInt(&intOk); if (!intOk) {