D16270: [effects/diminactive] Fix false-triggering of the out animation

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag added inline comments.

INLINE COMMENTS

> davidedmundson wrote in diminactive.cpp:86-91
> could this become updateActiveWindow(effects->activeWindow());

I was thinking about something similar. We could split canDimWindow:

  bool canDimWindow(const EffectWindow *w)
  {
      if (m_activeWindow == w) {
          return false;
      }
  
      // check window group
  
      return isDimWindow(w);
  }
  
  bool isDimWindow(const EffectWindow *w)
  {
      if (!m_dimKeepAbove && w->w->keepAbove()) {
          return fasel;
      }
  
      // other checks
  
      return w->isNormalWindow() || ...;
  }

And use isDimWindow here, in reconfigure, and in updateActiveWindow. By doing that, we won't need all those ugly m_activeWindow = nullptr;

REPOSITORY
  R108 KWin

BRANCH
  effects-diminactive-false-trigger

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

To: zzag, #kwin, davidedmundson
Cc: davidedmundson, abetts, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, 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.