xserver/dix/devices_priv.h
Enrico Weigelt, metux IT consult 81a8619bda
Some checks are pending
Build X servers / xserver-build-ubuntu (push) Waiting to run
Build X servers / drivers-build-ubuntu (push) Waiting to run
Build X servers / xserver-build-mingw32-ubuntu (push) Waiting to run
Build X servers / xserver-build-macos (push) Waiting to run
Build X servers / xserver-build-freebsd (push) Waiting to run
Build X servers / xserver-build-dragonflybsd (push) Waiting to run
Build X servers / Release pushed tag (push) Blocked by required conditions
check PRs for merge conflicts / notify (push) Waiting to run
delete old workflow runs / delete_old_workflow_runs (push) Waiting to run
delete old workflow runs / purge_deleted_branch_workflows (push) Waiting to run
dix: replace XACE_CLIENT_ACCESS by direct callback
Replace complicated xace hook by simple and cheap callback.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-07 10:52:54 +02:00

30 lines
768 B
C

/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#ifndef _XSERVER_DIX_DEVICES_PRIV_H
#define _XSERVER_DIX_DEVICES_PRIV_H
#include "include/callback.h"
#include "include/dix.h"
/*
* called when a client tries to access devices
*/
extern CallbackListPtr DeviceAccessCallback;
typedef struct {
ClientPtr client;
DeviceIntPtr dev;
Mask access_mode;
int status;
} DeviceAccessCallbackParam;
static inline int dixCallDeviceAccessCallback(ClientPtr client, DeviceIntPtr dev, Mask access_mode)
{
DeviceAccessCallbackParam rec = { client, dev, access_mode, Success };
CallCallbacks(&DeviceAccessCallback, &rec);
return rec.status;
}
#endif /* _XSERVER_DIX_DEVICES_PRIV_H */