dix: add dixAddAtom()

Convenient helper function for creating atom and get it's ID.
If atom already exist, the existing ID is retrieved.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-07-22 15:20:32 +02:00
committed by Enrico Weigelt
parent c32b5b4d5b
commit 63cdf161d3

View File

@@ -704,6 +704,18 @@ static inline int WriteRpcbufToClient(ClientPtr pClient,
return ret;
}
/*
* @brief make atom from null-terminated string
*
* if atom already existing, return the existing Atom ID
*
* @param name the atom name
* @return atom ID
*/
static inline Atom dixAddAtom(const char *name) {
return MakeAtom(name, strlen(name), TRUE);
}
/*
* @brief retrieve atom ID by name
*