Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwinanimationeffect.cpp
Show First 20 Lines • Show All 485 Lines • ▼ Show 20 Line(s) | |||||
486 | 486 | | |||
487 | void AnimationEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int time ) | 487 | void AnimationEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int time ) | ||
488 | { | 488 | { | ||
489 | Q_D(AnimationEffect); | 489 | Q_D(AnimationEffect); | ||
490 | if ( d->m_animated ) { | 490 | if ( d->m_animated ) { | ||
491 | AniMap::const_iterator entry = d->m_animations.constFind( w ); | 491 | AniMap::const_iterator entry = d->m_animations.constFind( w ); | ||
492 | if ( entry != d->m_animations.constEnd() ) { | 492 | if ( entry != d->m_animations.constEnd() ) { | ||
493 | bool isUsed = false; | 493 | bool isUsed = false; | ||
494 | bool paintDeleted = false; | ||||
494 | for (QList<AniData>::const_iterator anim = entry->first.constBegin(); anim != entry->first.constEnd(); ++anim) { | 495 | for (QList<AniData>::const_iterator anim = entry->first.constBegin(); anim != entry->first.constEnd(); ++anim) { | ||
495 | if (anim->startTime > clock() && !anim->waitAtSource) | 496 | if (anim->startTime > clock() && !anim->waitAtSource) | ||
496 | continue; | 497 | continue; | ||
497 | 498 | | |||
498 | isUsed = true; | 499 | isUsed = true; | ||
499 | if (anim->attribute == Opacity || anim->attribute == CrossFadePrevious) | 500 | if (anim->attribute == Opacity || anim->attribute == CrossFadePrevious) | ||
500 | data.setTranslucent(); | 501 | data.setTranslucent(); | ||
501 | else if (!(anim->attribute == Brightness || anim->attribute == Saturation)) { | 502 | else if (!(anim->attribute == Brightness || anim->attribute == Saturation)) { | ||
502 | data.setTransformed(); | 503 | data.setTransformed(); | ||
503 | data.mask |= PAINT_WINDOW_TRANSFORMED; | 504 | data.mask |= PAINT_WINDOW_TRANSFORMED; | ||
504 | if (anim->attribute == Clip) | 505 | if (anim->attribute == Clip) | ||
505 | clipWindow(w, *anim, data.quads); | 506 | clipWindow(w, *anim, data.quads); | ||
506 | } | 507 | } | ||
508 | | ||||
509 | paintDeleted |= anim->keepAlive; | ||||
507 | } | 510 | } | ||
508 | if ( isUsed ) { | 511 | if ( isUsed ) { | ||
509 | if ( w->isMinimized() ) | 512 | if ( w->isMinimized() ) | ||
510 | w->enablePainting( EffectWindow::PAINT_DISABLED_BY_MINIMIZE ); | 513 | w->enablePainting( EffectWindow::PAINT_DISABLED_BY_MINIMIZE ); | ||
511 | else if ( w->isDeleted() ) | 514 | else if ( w->isDeleted() && paintDeleted ) | ||
512 | w->enablePainting( EffectWindow::PAINT_DISABLED_BY_DELETE ); | 515 | w->enablePainting( EffectWindow::PAINT_DISABLED_BY_DELETE ); | ||
513 | else if ( !w->isOnCurrentDesktop() ) | 516 | else if ( !w->isOnCurrentDesktop() ) | ||
514 | w->enablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP ); | 517 | w->enablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP ); | ||
515 | // if( !w->isPaintingEnabled() && !effects->activeFullScreenEffect() ) | 518 | // if( !w->isPaintingEnabled() && !effects->activeFullScreenEffect() ) | ||
516 | // effects->addLayerRepaint(w->expandedGeometry()); | 519 | // effects->addLayerRepaint(w->expandedGeometry()); | ||
517 | } | 520 | } | ||
518 | } | 521 | } | ||
519 | } | 522 | } | ||
▲ Show 20 Lines • Show All 450 Lines • Show Last 20 Lines |