D28101: [Toplevel] Check info being null

Vlad Zahorodnii noreply at phabricator.kde.org
Tue Mar 17 14:52:58 GMT 2020


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


More information about the kwin mailing list