slidingpopups claim windowClosedGrabRole earlier
This seems like a more proper fix for the flickering issue in the sliding popups effect. The problem is that slidingpopups grabs the window in windowClosed, the fade effect checks it there, which makes it racy. In my tests, I've not seen this problem with the WindowAddedGrab, but as far as I understand, the problem may well be present there as well. (And my proposed trick doesn't work.) I've not seen this happening in my debugging, however. The problem there is also less visible since the transparency curves go into the same direction, and are more "in line with each other". So, fix: Move the setData(WindowClosedGrabRole, ...) call from windowClosed into windowAdded, which makes sure it's set whenever the window goes away. REVIEW:115903 BUG:329991
This commit is contained in:
parent
ca172e2082
commit
d2ae57832b
1 changed files with 5 additions and 1 deletions
|
@ -267,8 +267,9 @@ void SlidingPopupsEffect::slotWindowAdded(EffectWindow *w)
|
|||
mAppearingWindows.insert(w, new QTimeLine(mWindowsData[ w ].fadeInDuration, this));
|
||||
mAppearingWindows[ w ]->setCurveShape(QTimeLine::EaseInOutCurve);
|
||||
|
||||
// Tell other windowAdded() effects to ignore this window
|
||||
// Tell other windowAdded() and windowClosed() effects to ignore this window
|
||||
w->setData(WindowAddedGrabRole, QVariant::fromValue(static_cast<void*>(this)));
|
||||
w->setData(WindowClosedGrabRole, QVariant::fromValue(static_cast<void*>(this)));
|
||||
w->setData(WindowForceBlurRole, true);
|
||||
|
||||
w->addRepaintFull();
|
||||
|
@ -313,6 +314,7 @@ void SlidingPopupsEffect::slotPropertyNotify(EffectWindow* w, long a)
|
|||
|
||||
if (data.length() < 1) {
|
||||
// Property was removed, thus also remove the effect for window
|
||||
w->setData(WindowClosedGrabRole, QVariant());
|
||||
delete mAppearingWindows.take(w);
|
||||
delete mDisappearingWindows.take(w);
|
||||
mWindowsData.remove(w);
|
||||
|
@ -379,6 +381,8 @@ void SlidingPopupsEffect::slotPropertyNotify(EffectWindow* w, long a)
|
|||
}
|
||||
animData.start = qMax<int>(animData.start, difference);
|
||||
mWindowsData[ w ] = animData;
|
||||
// Grab the window, so other windowClosed effects will ignore it
|
||||
w->setData(WindowClosedGrabRole, QVariant::fromValue(static_cast<void*>(this)));
|
||||
}
|
||||
|
||||
bool SlidingPopupsEffect::isActive() const
|
||||
|
|
Loading…
Reference in a new issue