D16542: [libkwineffects] Don't enable painting for windows that are not kept alive

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
  862bf0f153255d4e3c36d862e718f3328d683d3e <https://phabricator.kde.org/R108:862bf0f153255d4e3c36d862e718f3328d683d3e> introduced a regression(sorry
  for that): if you close a confirmation dialog(with the Scale effect and the
  Dialog Parent effect being enabled), the main window(s) will flicker.
  
  That flickering happens because the C++ version of the Scale effect and
  AnimationEffect unref deleted windows in different places. AnimationEffect
  unrefs deleted windows in prePaintScreen, which btw is not the best
  place to do that. The C++ version unrefs windows in postPaintScreen.
  
  So, when the Scale effect has finished animating the main windows, it
  will unref them, but windowDeleted signal won't be emitted immediately.
  Which means that the Dialog Parent won't be able to delete corresponding
  animations on its side and main windows will be painted for a single
  frame.
  
  This change addresses flickering by adjusting prePaintWindow in
  AnimationEffect so deleted windows won't be painted if none of
  animations keeps them alive.

TEST PLAN
  (make sure that both the scale and the dialog parent effect are enabled)
  
  - Go to System Settings > Application Style > Window Decorations;
  - Select a decoration that is different from the current;
  - Close the system settings window (don't use "Apply" button for that);
  - When a dialog is shown, click "Discard" or "Apply" button.

REPOSITORY
  R108 KWin

BRANCH
  animationeffect-dont-draw-deleted

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

AFFECTED FILES
  libkwineffects/kwinanimationeffect.cpp

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.