D22277: Save Compositor state in single variable

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

INLINE COMMENTS

> composite.cpp:174
>      }
> -    if (hasScene())
> +    if (m_state == State::On || m_state == State::Starting) {
>          return;

Starting compositor while it's being turned down will lead to a catastrophe. Thus, it can be simplified to m_state != State::Off.

> composite.cpp:435
>  void Compositor::releaseCompositorSelection()
>  {
> +    if (m_state != State::Off) {

Hmm, this method is hard to read. I suggest to use a switch statement.

REPOSITORY
  R108 KWin

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

To: romangg, #kwin
Cc: zzag, kwin, LeGast00n, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, 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.