Commit 5469558c authored by Vlad Zahorodnii's avatar Vlad Zahorodnii Committed by Vlad Zahorodnii
Browse files

[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
parent 9dd7a188
......@@ -400,23 +400,25 @@ void SlidingPopupsEffect::setupInternalWindowSlide(EffectWindow *w)
if (!slideProperty.isValid()) {
return;
}
AnimationData &animData = m_animationsData[w];
Location location;
switch (slideProperty.value<KWindowEffects::SlideFromLocation>()) {
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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment