Introduce ClientConnection::aboutToBeDestroyed
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.
This commit is contained in:
parent
da3f4923f1
commit
c2fc33872e
2 changed files with 5 additions and 0 deletions
|
@ -68,6 +68,7 @@ void ClientConnectionPrivate::destroyListenerCallback(wl_listener *listener, voi
|
|||
Q_ASSERT(it != s_allClients.constEnd());
|
||||
auto p = (*it);
|
||||
auto q = p->q;
|
||||
emit q->aboutToBeDestroyed();
|
||||
p->client = nullptr;
|
||||
wl_list_remove(&p->listener.link);
|
||||
emit q->disconnected(q);
|
||||
|
|
|
@ -123,6 +123,10 @@ public:
|
|||
void destroy();
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
* This signal is emitted when the client is about to be destroyed.
|
||||
*/
|
||||
void aboutToBeDestroyed();
|
||||
/**
|
||||
* Signal emitted when the ClientConnection got disconnected from the server.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue