dix: add dixGetAtomID()

Helper function for retrieving _existing_ atom ID for given name.
If atom doesn't exist yet, it won't be created, but returning None instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-07-22 14:44:40 +02:00
committed by Enrico Weigelt
parent 02a88519a2
commit 9a60579994

View File

@@ -704,4 +704,16 @@ static inline int WriteRpcbufToClient(ClientPtr pClient,
return ret;
}
/*
* @brief retrieve atom ID by name
*
* if the atom doesn't exist yet, 0 / NONE is returned
*
* @param name the atom name
* @return atom ID
*/
static inline Atom dixGetAtomID(const char *name) {
return MakeAtom(name, strlen(name), FALSE);
}
#endif /* _XSERVER_DIX_PRIV_H */