mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-06 06:58:03 +02:00
Use dmxBEAtom where possible.
This commit is contained in:
parent
e598c34e7d
commit
09fffa12ea
4 changed files with 18 additions and 38 deletions
|
|
@ -40,9 +40,12 @@ dmxAtom (DMXScreenInfo *dmxScreen,
|
||||||
|
|
||||||
if (!atom)
|
if (!atom)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name = NULL;
|
||||||
|
|
||||||
|
XLIB_PROLOGUE (dmxScreen);
|
||||||
name = XGetAtomName (dmxScreen->beDisplay, beAtom);
|
name = XGetAtomName (dmxScreen->beDisplay, beAtom);
|
||||||
|
XLIB_EPILOGUE (dmxScreen);
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
return None;
|
return None;
|
||||||
|
|
||||||
|
|
@ -90,7 +93,9 @@ dmxBEAtom (DMXScreenInfo *dmxScreen,
|
||||||
if (!name)
|
if (!name)
|
||||||
return None;
|
return None;
|
||||||
|
|
||||||
|
XLIB_PROLOGUE (dmxScreen);
|
||||||
beAtom = XInternAtom (dmxScreen->beDisplay, name, FALSE);
|
beAtom = XInternAtom (dmxScreen->beDisplay, name, FALSE);
|
||||||
|
XLIB_EPILOGUE (dmxScreen);
|
||||||
|
|
||||||
if (atom >= dmxScreen->beAtomTableSize)
|
if (atom >= dmxScreen->beAtomTableSize)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
#include "dmxprop.h"
|
#include "dmxprop.h"
|
||||||
#include "dmxwindow.h"
|
#include "dmxwindow.h"
|
||||||
#include "dmxlog.h"
|
#include "dmxlog.h"
|
||||||
|
#include "dmxatom.h"
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
|
|
@ -420,9 +421,7 @@ dmxDeleteProperty (WindowPtr pWin,
|
||||||
XLIB_PROLOGUE (dmxScreen);
|
XLIB_PROLOGUE (dmxScreen);
|
||||||
XDeleteProperty (dmxScreen->beDisplay,
|
XDeleteProperty (dmxScreen->beDisplay,
|
||||||
pWinPriv->window,
|
pWinPriv->window,
|
||||||
XInternAtom (dmxScreen->beDisplay,
|
dmxBEAtom (dmxScreen, property));
|
||||||
NameForAtom (property),
|
|
||||||
FALSE));
|
|
||||||
XLIB_EPILOGUE (dmxScreen);
|
XLIB_EPILOGUE (dmxScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -487,9 +486,7 @@ dmxRotateProperties (WindowPtr pWin,
|
||||||
|
|
||||||
XLIB_PROLOGUE (dmxScreen);
|
XLIB_PROLOGUE (dmxScreen);
|
||||||
for (i = 0; i < nAtoms; i++)
|
for (i = 0; i < nAtoms; i++)
|
||||||
buf[i] = XInternAtom (dmxScreen->beDisplay,
|
buf[i] = dmxBEAtom (dmxScreen, atoms[i]);
|
||||||
NameForAtom (atoms[i]),
|
|
||||||
FALSE);
|
|
||||||
|
|
||||||
XRotateWindowProperties (dmxScreen->beDisplay,
|
XRotateWindowProperties (dmxScreen->beDisplay,
|
||||||
pWinPriv->window,
|
pWinPriv->window,
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
#include "dmxcb.h"
|
#include "dmxcb.h"
|
||||||
#include "dmxrandr.h"
|
#include "dmxrandr.h"
|
||||||
#include "dmxclient.h"
|
#include "dmxclient.h"
|
||||||
|
#include "dmxatom.h"
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
|
|
@ -897,11 +898,8 @@ dmxRROutputSetProperty (ScreenPtr pScreen,
|
||||||
|
|
||||||
validValues = p->valid_values;
|
validValues = p->valid_values;
|
||||||
|
|
||||||
XLIB_PROLOGUE (dmxScreen);
|
atom = dmxBEAtom (dmxScreen, property);
|
||||||
atom = XInternAtom (dmxScreen->beDisplay, NameForAtom (property), FALSE);
|
type = dmxBEAtom (dmxScreen, value->type);
|
||||||
type = XInternAtom (dmxScreen->beDisplay, NameForAtom (value->type),
|
|
||||||
FALSE);
|
|
||||||
XLIB_EPILOGUE (dmxScreen);
|
|
||||||
|
|
||||||
if (type == XA_ATOM && value->format == 32)
|
if (type == XA_ATOM && value->format == 32)
|
||||||
{
|
{
|
||||||
|
|
@ -934,13 +932,7 @@ dmxRROutputSetProperty (ScreenPtr pScreen,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
for (i = 0; i < p->num_valid; i++)
|
for (i = 0; i < p->num_valid; i++)
|
||||||
{
|
validValues[i] = dmxBEAtom (dmxScreen, p->valid_values[i]);
|
||||||
XLIB_PROLOGUE (dmxScreen);
|
|
||||||
validValues[i] = XInternAtom (dmxScreen->beDisplay,
|
|
||||||
NameForAtom (p->valid_values[i]),
|
|
||||||
FALSE);
|
|
||||||
XLIB_EPILOGUE (dmxScreen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value->size)
|
if (value->size)
|
||||||
|
|
@ -952,13 +944,7 @@ dmxRROutputSetProperty (ScreenPtr pScreen,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
for (i = 0; i < value->size; i++)
|
for (i = 0; i < value->size; i++)
|
||||||
{
|
values[i] = dmxBEAtom (dmxScreen, atoms[i]);
|
||||||
XLIB_PROLOGUE (dmxScreen);
|
|
||||||
values[i] = XInternAtom (dmxScreen->beDisplay,
|
|
||||||
NameForAtom (atoms[i]),
|
|
||||||
FALSE);
|
|
||||||
XLIB_EPILOGUE (dmxScreen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@
|
||||||
#include "dmxscrinit.h"
|
#include "dmxscrinit.h"
|
||||||
#include "dmxcursor.h"
|
#include "dmxcursor.h"
|
||||||
#include "dmxfont.h"
|
#include "dmxfont.h"
|
||||||
|
#include "dmxatom.h"
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
#include "dmxpict.h"
|
#include "dmxpict.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1242,13 +1243,8 @@ dmxTranslateWindowProperty (WindowPtr pWindow,
|
||||||
case 'A': {
|
case 'A': {
|
||||||
Atom *src = (Atom *) data;
|
Atom *src = (Atom *) data;
|
||||||
Atom *dst = (Atom *) output;
|
Atom *dst = (Atom *) output;
|
||||||
char *name;
|
|
||||||
|
|
||||||
name = NameForAtom (*src);
|
*dst = dmxBEAtom (dmxScreen, *src);
|
||||||
if (name)
|
|
||||||
*dst = XInternAtom (dmxScreen->beDisplay, name, FALSE);
|
|
||||||
else
|
|
||||||
*dst = 0;
|
|
||||||
} break;
|
} break;
|
||||||
case 'p':
|
case 'p':
|
||||||
case 'P': {
|
case 'P': {
|
||||||
|
|
@ -1525,12 +1521,8 @@ dmxBESetWindowProperty (WindowPtr pWindow,
|
||||||
XLIB_PROLOGUE (dmxScreen);
|
XLIB_PROLOGUE (dmxScreen);
|
||||||
XChangeProperty (dmxScreen->beDisplay,
|
XChangeProperty (dmxScreen->beDisplay,
|
||||||
pWinPriv->window,
|
pWinPriv->window,
|
||||||
XInternAtom (dmxScreen->beDisplay,
|
dmxBEAtom (dmxScreen, pProp->propertyName),
|
||||||
NameForAtom (pProp->propertyName),
|
dmxBEAtom (dmxScreen, pProp->type),
|
||||||
FALSE),
|
|
||||||
XInternAtom (dmxScreen->beDisplay,
|
|
||||||
NameForAtom (pProp->type),
|
|
||||||
FALSE),
|
|
||||||
pProp->format,
|
pProp->format,
|
||||||
PropModeReplace,
|
PropModeReplace,
|
||||||
data,
|
data,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue