D15302: [effects/coverswitch] Port to TimeLine

David Edmundson <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
davidedmundson added inline comments.

INLINE COMMENTS

> coverswitch.cpp:406
>          if (stop)  // Fade out windows not on the current desktop
> -            data.setOpacity((1.0 - timeLine.currentValue()));
> +            data.setOpacity((1.0 - timeLine.value()));
>          else // Fade in Windows from other desktops when animation is started

one set of parentheses seems redundant

> coverswitch.cpp:545
>                  stop = true;
> -                timeLine.setCurrentTime(timeLine.duration() - timeLine.currentValue());
> +                timeLine.setElapsed(timeLine.duration() - timeLine.elapsed());
>              } else {

it'll be a bigger refactor, but would it be more in line with Timeline to do .setDirection()

(maybe afterwards)

then we can kill all the

  data.setOpacity(1.0 - timeLine.currentValue());
  if (stop)
      data.setOpacity(timeLine.currentValue());

everywhere.

> coverswitch.cpp:550
>          } else
>              effects->setActiveFullScreenEffect(0);
>          mActivated = false;

we should reset the timeline here

If animateStart is on and animateStop is off and a user cancels halfway through the load, we become inactive straight away and won't hit the main cleanup.

> coverswitch.cpp:740
>      }
>      if (specialHandlingForward) {
> +        data.multiplyOpacity((1.0 - timeLine.value() * 2.0));

I know you've not touched this, but

should these two lines be wrapped in

&& timeLine.value < 0.5

> coverswitch.cpp:918
>      }
>      effects->setActiveFullScreenEffect(0);
>      mActivated = false;

should we not reset the timeline here?

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D15302

To: zzag, #kwin
Cc: davidedmundson, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.