From 16246adc8e7b2cd5dc2218d3641ffa1118e3b888 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 22 Jul 2025 15:55:34 +0200 Subject: [PATCH] Xi: use dixAddAtom() Use the new helper for creating atoms on demand. Signed-off-by: Enrico Weigelt, metux IT consult --- Xi/extinit.c | 3 +-- Xi/xiproperty.c | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Xi/extinit.c b/Xi/extinit.c index 572ed3d68..ba99c99bc 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -1245,8 +1245,7 @@ MakeDeviceTypeAtoms(void) int i; for (i = 0; i < NUMTYPES; i++) - dev_type[i].type = - MakeAtom(dev_type[i].name, strlen(dev_type[i].name), 1); + dev_type[i].type = dixAddAtom(dev_type[i].name); } /***************************************************************************** diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index 2691a8935..133e2ffe9 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -32,6 +32,7 @@ #include #include +#include "dix/dix_priv.h" #include "dix/exevents_priv.h" #include "dix/extension_priv.h" #include "dix/input_priv.h" @@ -375,12 +376,8 @@ XIGetKnownProperty(const char *name) for (i = 0; i < ARRAY_SIZE(dev_properties); i++) { if (strcmp(name, dev_properties[i].name) == 0) { - if (dev_properties[i].type == None) { - dev_properties[i].type = - MakeAtom(dev_properties[i].name, - strlen(dev_properties[i].name), TRUE); - } - + if (dev_properties[i].type == None) + dev_properties[i].type = dixAddAtom(dev_properties[i].name); return dev_properties[i].type; } }