D16372: [effects] Re-implement the Minimize Animation effect in JavaScript

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag created this revision.
zzag added reviewers: KWin, Plasma.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.

REVISION SUMMARY
  There were several reasons to rewrite the Minimize Animation effect in
  JavaScript: to simplify code and to get rid of full repaints. One could
  say that nothing prevents us from calculating the dirty region in
  postPaintScreen or postPaintWindow and it is correct, but with the
  scripting effects API the dirty region will be calculated for us, so we
  can focus more on "what we want" instead of "how".
  
  Visually, the "old" effect and the rewritten one look quite the same.
  Except one tiny bit: if a window doesn't have an icon in the task manager,
  it won't be animated. The reason for that is the purpose of this effect is
  to show where the window will be after it's minimized, if the window
  doesn't have icon in the task manager, one can't click at the center of
  the screen to unminimize the window.
  
  There is one significant change, the name of the effect was changed to
  "Squash". If we put this effect and the Magic lamp effect under "Window
  Minimize Animation" category (or if we add some "heading" label), then
  the old name and the name of the category would "conflict". The new name
  was suggested by Nate Graham and it very closely describes what the
  effect does. "Scale" doesn't fit this effect because while a window is
  being animated, its aspect ratio is not preserved.

REPOSITORY
  R108 KWin

BRANCH
  zzag/port-minimizeanimation-to-javascript

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

AFFECTED FILES
  autotests/test_builtin_effectloader.cpp
  autotests/test_plugin_effectloader.cpp
  autotests/test_scripted_effectloader.cpp
  effects/CMakeLists.txt
  effects/effect_builtins.cpp
  effects/effect_builtins.h
  effects/minimizeanimation/CMakeLists.txt
  effects/minimizeanimation/minimizeanimation.cpp
  effects/minimizeanimation/minimizeanimation.h
  effects/squash/CMakeLists.txt
  effects/squash/package/CMakeLists.txt
  effects/squash/package/contents/code/main.js
  effects/squash/package/metadata.desktop
  kconf_update/kwin.upd

To: zzag, #kwin, #plasma
Cc: 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.