D14919: [effects/dialogparent] Fix flickering of parent window

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

REVISION SUMMARY
  If a modal window is closed and some alternative effect that animates
  the disappearing of windows is enabled(e.g. the Glide effect, or the
  Scale effect), the Dialog Parent effect can cause flickering of the
  parent window because its animation duration doesn't match duration of
  those alternative effects.
  
  Also, if the Fade effect, the Glide effect, and the Scale effect are
  disabled, the Dialog Parent will keep the parent window alive for no
  good reason.
  
  This change addresses that problem by adding keepAlive property to
  `animate` function so scripted effects have more control over lifetime
  of animated windows.
  
  If both a modal window and its parent window are closed at the same time
  (and there is no effect that animates the disappearing of windows), the
  Dialog Parent will stop immediately(because windowDeleted will be
  emitted right after windowClosed signal).
  
  If both a modal window and its parent window are closed at the same time
  (and there is effect that animates the disappearing of windows), the
  Dialog Parent won't reference the latter window. Thus, it won't cause
  flickering. I.e. it will "passively" animate parent windows.
  
  CCBUG: 355036

REPOSITORY
  R108 KWin

BRANCH
  scripting-passive-effects

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

AFFECTED FILES
  autotests/integration/effects/scripted_effects_test.cpp
  autotests/integration/effects/scripts/keepAliveTest.js
  autotests/integration/effects/scripts/keepAliveTestDontKeep.js
  effects/dialogparent/package/contents/code/main.js
  libkwineffects/anidata.cpp
  libkwineffects/anidata_p.h
  libkwineffects/kwinanimationeffect.cpp
  libkwineffects/kwinanimationeffect.h
  scripting/scriptedeffect.cpp
  scripting/scriptedeffect.h

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