D22277: Save Compositor state in single variable

Vlad Zagorodniy noreply at phabricator.kde.org
Thu Jul 4 18:26:50 BST 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190704/008f83f3/attachment.html>


More information about the kwin mailing list