D28101: [Toplevel] Check info being null

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

INLINE COMMENTS

> toplevel.cpp:218-220
> +    if (!info) {
> +        return;
> +    }

Don't need this check because getResourceClass is only called by X11Client and Unmanaged.

> toplevel.cpp:238-240
> +    if (!info) {
> +        return 1.0;
> +    }

opacity() is overridden in Deleted so this check can be dropped.

Ideally, Toplevel::opacity() should be implemented as follows

  double Toplevel::opacity() const
  {
      return m_opacity;
  }

> toplevel.cpp:615-617
> +    if (!info) {
> +        return;
> +    }

getWmOpaqueRegion() is only called by X11Client and Unmanaged so this check can be dropped.

> toplevel.cpp:661-663
> +    if (!info) {
> +        return -1;
> +    }

pid() must be overridden by Deleted.

> toplevel.cpp:743-745
> +    if (!info) {
> +        return {};
> +    }

windowRole() is overridden by Deleted.

REPOSITORY
  R108 KWin

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

To: broulik, #kwin, davidedmundson
Cc: zzag, davidedmundson, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, 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.