effects: Make effects responsible for handling skipsCloseAnimation flag
This allows to make painting code more generic.
This commit is contained in:
parent
701902fbec
commit
6851996eb2
6 changed files with 5 additions and 9 deletions
|
@ -82,7 +82,7 @@ class FadeEffect {
|
|||
if (effects.hasActiveFullScreenEffect) {
|
||||
return;
|
||||
}
|
||||
if (!this.fadeWindows || !FadeEffect.isFadeWindow(window)) {
|
||||
if (!this.fadeWindows || window.skipsCloseAnimation || !FadeEffect.isFadeWindow(window)) {
|
||||
return;
|
||||
}
|
||||
window.fadeOutAnimation = animate({
|
||||
|
|
|
@ -99,7 +99,7 @@ var fadingPopupsEffect = {
|
|||
if (!isPopupWindow(window)) {
|
||||
return;
|
||||
}
|
||||
if (!window.visible) {
|
||||
if (!window.visible || window.skipsCloseAnimation) {
|
||||
return;
|
||||
}
|
||||
if (!effect.grab(window, Effect.WindowClosedGrabRole)) {
|
||||
|
|
|
@ -237,7 +237,7 @@ void GlideEffect::windowClosed(EffectWindow *w)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!w->isVisible()) {
|
||||
if (!w->isVisible() || w->skipsCloseAnimation()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ class ScaleEffect {
|
|||
if (!ScaleEffect.isScaleWindow(window)) {
|
||||
return;
|
||||
}
|
||||
if (!window.visible) {
|
||||
if (!window.visible || window.skipsCloseAnimation) {
|
||||
return;
|
||||
}
|
||||
if (!effect.grab(window, Effect.WindowClosedGrabRole)) {
|
||||
|
|
|
@ -182,7 +182,7 @@ void SheetEffect::slotWindowClosed(EffectWindow *w)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!isSheetWindow(w)) {
|
||||
if (!isSheetWindow(w) || w->skipsCloseAnimation()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -511,10 +511,6 @@ void Scene::paintWindow(Window* w, int mask, const QRegion &_region)
|
|||
const QRegion region = _region & QRect({0, 0}, screens()->size());
|
||||
if (region.isEmpty()) // completely clipped
|
||||
return;
|
||||
if (w->window()->isDeleted() && w->window()->skipsCloseAnimation()) {
|
||||
// should not get painted
|
||||
return;
|
||||
}
|
||||
|
||||
WindowPaintData data(w->window()->effectWindow(), screenProjectionMatrix());
|
||||
effects->paintWindow(effectWindow(w), mask, region, data);
|
||||
|
|
Loading…
Reference in a new issue