D28085: Adapt to new KScreenLocker API

Roman Gilg <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
romangg added inline comments.

INLINE COMMENTS

> davidedmundson wrote in wayland_server.cpp:526
> why do we do this on every lock?

Because the client connection is reset after every lock/unlock and I'm not sure it's possible to reuse the same socket for a new client. The connection is accessed by the greeter. And if the greeter exits the client connection is destroyed by callback.

> davidedmundson wrote in wayland_server.cpp:529
> Can this be done the other way round in the seat constructor
> 
> then we get rid of all these connects and disconnects

Yea, when the KSldApp is a undestroyed singleton sure. Having it here improves locality imo but I can also put it in the constructors.

> davidedmundson wrote in wayland_server.cpp:578
> who deletes m_screenLockerClientConnection in this case?

When the client goes down libwayland calls into the client connection destroy callback and that deletes the client here:
https://cgit.kde.org/kwayland.git/tree/src/server/clientconnection.cpp#n61

At this point trying to delete the connection from KWin's side would be a double-free.

If you think this API is not so intuitive don't look in the Client lib. :)

REPOSITORY
  R108 KWin

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

To: romangg, #kwin
Cc: davidedmundson, apol, 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, 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.