D22755: [platforms/xcb] Use XRES extension to get real window PID

Vlad Zagorodniy noreply at phabricator.kde.org
Fri Jul 26 10:14:53 BST 2019


zzag added a comment.


  > Querying the NET_WM_ATOM with the NETWM classes remains unchanged
  
  _NET_WM_PID?

INLINE COMMENTS

> kwindowinfo.cpp:85
> +        specs.mask = XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID;
> +        auto cookie = xcb_res_query_client_ids(QX11Info::connection(), 1, &specs);
> +

I don't like `auto` here, but on the other hand we don't have yet any policy on whether auto is allowed to be used in this case.

> kwindowinfo.cpp:449
>  {
> +    if (m_pid > 0) {
> +        return m_pid;

Leave a comment that explains why m_pid is preferred.

> kwindowinfo.cpp:462
> +
> +bool KWindowInfoPrivateX11::haveXres()
> +{

Make it a static function instead.

REPOSITORY
  R278 KWindowSystem

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

To: davidedmundson
Cc: zzag, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190726/678159da/attachment.html>


More information about the Kde-frameworks-devel mailing list