[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
This commit is contained in:
parent
9dd7a1881b
commit
5469558c1a
1 changed files with 7 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue