D8050: Expose wl_display_set_global_filter as a virtual method

David Edmundson noreply at phabricator.kde.org
Fri Sep 29 15:58:37 UTC 2017


davidedmundson added inline comments.

INLINE COMMENTS

> graesslin wrote in filtered_display.cpp:41
> Why a const cast? Or other said: could we overload the getConnection to accept a const wl_client*?

I tried.

modding getConnection means modding modding ClientConnection constructor, modding that means modding the Private ctor

that gets into

  wl_client_add_destroy_listener(c, &listener);

c is now const, that fails.

----

We have 3 options:

- a const_cast somewhere
- Change Display to create ClientConnections when they come in, not on demand, then we can make getconnection const everywhere. (IMHO, maybe worth it, as our current clientConnected signal is rather misleading)
- return PID in the API here instead of the client.

REPOSITORY
  R127 KWayland

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

To: davidedmundson, #plasma
Cc: graesslin, plasma-devel, #frameworks, leezu, ZrenBot, alexeymin, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170929/63e415ad/attachment.html>


More information about the Plasma-devel mailing list