Currently, we store all surfaces in a single list and use linear search
to find the SurfaceInterface by its object id and client connection.
With this, we first search for the wl_resource object by its id. Once we
have a wl_resource, SurfaceInterface::get(wl_resource) can be used.
The main advantage of the proposed solution is that we don't need to
maintain a static list with all SurfaceInterface objects.
This signal is useful if the compositor wants to perform some cleanup
before the disconnected signal is emitted or while the connection object
still has valid wl_client native handle.
Summary:
In the situation that a wl_client gets destroyed while still
wl_resources are around it can happen that one of them calls into the
ClientConnection during the cleanup handling which gets triggered at the
same time. This can then trigger a crash.
This change uses deleteLater for the ClientConnection and sets the hold
wl_client pointer to null instead of deleting directly. So the
ClientConnection is still around while the Resources gets cleaned up.
This is similar to the cleanup of Resource where on unbind the
wl_resource pointer is set to null and the Resource gets delete later.
BUG: 370232
FIXED-IN: 5.28
Reviewers: #plasma, bshah
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3004
Summary: Convenient API to get the absolute executable path for the pid.
Reviewers: sebas, mart
Subscribers: plasma-devel
Differential Revision: https://phabricator.kde.org/D858
Wrapper around wl_client_destroy. In case the ClientConnection got
created through Display::createClient we need to destroy the
ClientConnection again. The exiting client will not cause it to be
destroyed.
Reviewed-By: Bhushan Shah
The ClientConnection is managed by Display. Whenever one tries to
get a ClientConnection for a wl_client* and it doesn't exist yet a
new one will be created and a clientConnected signal will be emitted.
Also there is a clientDisconnected signal.
ClientConnection provides access to pid, uid and gid. The idea is
to extend it to provide access to all the resources created for the
client.