dix: add callback before ClientRec is being destroyed

Existing client-state hook isn't sufficient for this, and so easy to
be extended cleanly (*1). Adding a new callback is trivial and cheap,
so preferring this way, instead of trying to tweak the existing hook
for something it's never been designed for.

*1) see discussion here: https://github.com/X11Libre/xserver/pull/1077

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-09-18 18:31:16 +02:00
committed by Enrico Weigelt
parent 4486a554f8
commit 9856372932
5 changed files with 32 additions and 2 deletions

View File

@@ -103,6 +103,7 @@ Equipment Corporation.
#include <X11/fonts/fontstruct.h>
#include <X11/fonts/libxfont2.h>
#include "dix/client_priv.h"
#include "dix/colormap_priv.h"
#include "dix/cursor_priv.h"
#include "dix/dix_priv.h"
@@ -3550,6 +3551,7 @@ CloseDownClient(ClientPtr client)
TouchListenerGone(client->clientAsMask);
GestureListenerGone(client->clientAsMask);
FreeClientResources(client);
CallCallbacks(&ClientDestroyCallback, client);
/* Disable client ID tracking. This must be done after
* ClientStateCallback. */
ReleaseClientIds(client);