randr: use dixGetAtomID()

Use the new shortcut helper for cases where we need to check
whether an atom exists and retrieve it's ID.

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:53:29 +02:00
committed by Enrico Weigelt
parent 9a60579994
commit 30cec786e5
3 changed files with 7 additions and 7 deletions

View File

@@ -24,6 +24,7 @@
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include "dix/dix_priv.h"
#include "randr/randrstr_priv.h" #include "randr/randrstr_priv.h"
#include "randr/rrdispatch_priv.h" #include "randr/rrdispatch_priv.h"
#include "os/bug_priv.h" #include "os/bug_priv.h"
@@ -453,7 +454,7 @@ rrGetPixmapSharingSyncProp(int numOutputs, RROutputPtr * outputs)
/* Determine if the user wants prime syncing */ /* Determine if the user wants prime syncing */
int o; int o;
const char *syncStr = PRIME_SYNC_PROP; const char *syncStr = PRIME_SYNC_PROP;
Atom syncProp = MakeAtom(syncStr, strlen(syncStr), FALSE); Atom syncProp = dixGetAtomID(syncStr);
if (syncProp == None) if (syncProp == None)
return TRUE; return TRUE;
@@ -477,7 +478,7 @@ rrSetPixmapSharingSyncProp(char val, int numOutputs, RROutputPtr * outputs)
{ {
int o; int o;
const char *syncStr = PRIME_SYNC_PROP; const char *syncStr = PRIME_SYNC_PROP;
Atom syncProp = MakeAtom(syncStr, strlen(syncStr), FALSE); Atom syncProp = dixGetAtomID(syncStr);
if (syncProp == None) if (syncProp == None)
return; return;
@@ -714,10 +715,9 @@ static Bool
rrCheckEmulated(RROutputPtr output) rrCheckEmulated(RROutputPtr output)
{ {
const char *emulStr = XRANDR_EMULATION_PROP; const char *emulStr = XRANDR_EMULATION_PROP;
Atom emulProp;
RRPropertyValuePtr val; RRPropertyValuePtr val;
emulProp = MakeAtom(emulStr, strlen(emulStr), FALSE); Atom emulProp = dixGetAtomID(emulStr);
if (emulProp == None) if (emulProp == None)
return FALSE; return FALSE;

View File

@@ -140,7 +140,7 @@ static void
RRNoticePropertyChange(RROutputPtr output, Atom property, RRPropertyValuePtr value) RRNoticePropertyChange(RROutputPtr output, Atom property, RRPropertyValuePtr value)
{ {
const char *non_desktop_str = RR_PROPERTY_NON_DESKTOP; const char *non_desktop_str = RR_PROPERTY_NON_DESKTOP;
Atom non_desktop_prop = MakeAtom(non_desktop_str, strlen(non_desktop_str), FALSE); Atom non_desktop_prop = dixGetAtomID(non_desktop_str);
if (property == non_desktop_prop) { if (property == non_desktop_prop) {
if (value->type == XA_INTEGER && value->format == 32 && value->size >= 1) { if (value->type == XA_INTEGER && value->format == 32 && value->size >= 1) {

View File

@@ -275,7 +275,7 @@ RRInitPrimeSyncProps(ScreenPtr pScreen)
rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
const char *syncStr = PRIME_SYNC_PROP; const char *syncStr = PRIME_SYNC_PROP;
Atom syncProp = MakeAtom(syncStr, strlen(syncStr), TRUE); Atom syncProp = dixGetAtomID(syncStr);
int defaultVal = TRUE; int defaultVal = TRUE;
INT32 validVals[2] = {FALSE, TRUE}; INT32 validVals[2] = {FALSE, TRUE};
@@ -306,7 +306,7 @@ RRFiniPrimeSyncProps(ScreenPtr pScreen)
int i; int i;
const char *syncStr = PRIME_SYNC_PROP; const char *syncStr = PRIME_SYNC_PROP;
Atom syncProp = MakeAtom(syncStr, strlen(syncStr), FALSE); Atom syncProp = dixGetAtomID(syncStr);
if (syncProp == None) if (syncProp == None)
return; return;