Files
xserver/dix/client_priv.h
Enrico Weigelt, metux IT consult 8e68c8d514 dix: replace XACE_CLIENT_ACCESS by direct callback
Move the callbacks directly into DIX, since it's actually core infrastructure.
Also simplifying the whole machinery, by just using a simpel CallbackListPtr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:24:13 +02:00

37 lines
946 B
C

/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#ifndef _XSERVER_DIX_CLIENT_PRIV_H
#define _XSERVER_DIX_CLIENT_PRIV_H
#include "include/callback.h"
#include "include/dix.h"
/*
* called right before ClientRec is about to be destroyed,
* after resources have been freed. argument is ClientPtr
*/
extern CallbackListPtr ClientDestroyCallback;
typedef struct {
ClientPtr client;
ClientPtr target;
Mask access_mode;
int status;
} ClientAccessCallbackParam;
/*
* called when a client tries to access another client
*/
extern CallbackListPtr ClientAccessCallback;
static inline int dixCallClientAccessCallback(ClientPtr client, ClientPtr target, Mask access_mode)
{
ClientAccessCallbackParam rec = { client, target, access_mode, Success };
CallCallbacks(&ClientAccessCallback, &rec);
return rec.status;
}
#endif /* _XSERVER_DIX_CLIENT_PRIV_H */