mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +00:00
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:
committed by
Enrico Weigelt
parent
9a60579994
commit
30cec786e5
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "randr/randrstr_priv.h"
|
||||
#include "randr/rrdispatch_priv.h"
|
||||
#include "os/bug_priv.h"
|
||||
@@ -453,7 +454,7 @@ rrGetPixmapSharingSyncProp(int numOutputs, RROutputPtr * outputs)
|
||||
/* Determine if the user wants prime syncing */
|
||||
int o;
|
||||
const char *syncStr = PRIME_SYNC_PROP;
|
||||
Atom syncProp = MakeAtom(syncStr, strlen(syncStr), FALSE);
|
||||
Atom syncProp = dixGetAtomID(syncStr);
|
||||
if (syncProp == None)
|
||||
return TRUE;
|
||||
|
||||
@@ -477,7 +478,7 @@ rrSetPixmapSharingSyncProp(char val, int numOutputs, RROutputPtr * outputs)
|
||||
{
|
||||
int o;
|
||||
const char *syncStr = PRIME_SYNC_PROP;
|
||||
Atom syncProp = MakeAtom(syncStr, strlen(syncStr), FALSE);
|
||||
Atom syncProp = dixGetAtomID(syncStr);
|
||||
if (syncProp == None)
|
||||
return;
|
||||
|
||||
@@ -714,10 +715,9 @@ static Bool
|
||||
rrCheckEmulated(RROutputPtr output)
|
||||
{
|
||||
const char *emulStr = XRANDR_EMULATION_PROP;
|
||||
Atom emulProp;
|
||||
RRPropertyValuePtr val;
|
||||
|
||||
emulProp = MakeAtom(emulStr, strlen(emulStr), FALSE);
|
||||
Atom emulProp = dixGetAtomID(emulStr);
|
||||
if (emulProp == None)
|
||||
return FALSE;
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ static void
|
||||
RRNoticePropertyChange(RROutputPtr output, Atom property, RRPropertyValuePtr value)
|
||||
{
|
||||
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 (value->type == XA_INTEGER && value->format == 32 && value->size >= 1) {
|
||||
|
||||
@@ -275,7 +275,7 @@ RRInitPrimeSyncProps(ScreenPtr pScreen)
|
||||
rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
|
||||
|
||||
const char *syncStr = PRIME_SYNC_PROP;
|
||||
Atom syncProp = MakeAtom(syncStr, strlen(syncStr), TRUE);
|
||||
Atom syncProp = dixGetAtomID(syncStr);
|
||||
|
||||
int defaultVal = TRUE;
|
||||
INT32 validVals[2] = {FALSE, TRUE};
|
||||
@@ -306,7 +306,7 @@ RRFiniPrimeSyncProps(ScreenPtr pScreen)
|
||||
int i;
|
||||
|
||||
const char *syncStr = PRIME_SYNC_PROP;
|
||||
Atom syncProp = MakeAtom(syncStr, strlen(syncStr), FALSE);
|
||||
Atom syncProp = dixGetAtomID(syncStr);
|
||||
if (syncProp == None)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user