mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 04:50:05 +01:00
Use dmxAtom where possible.
This commit is contained in:
parent
ea6ab98a98
commit
32d23b8cf2
3 changed files with 7 additions and 51 deletions
|
|
@ -97,7 +97,7 @@ dmxBEAtom (DMXScreenInfo *dmxScreen,
|
|||
beAtom = XInternAtom (dmxScreen->beDisplay, name, FALSE);
|
||||
XLIB_EPILOGUE (dmxScreen);
|
||||
|
||||
if (atom >= dmxScreen->beAtomTableSize)
|
||||
if (atom >= dmxScreen->atomTableSize)
|
||||
{
|
||||
Atom *table;
|
||||
int i;
|
||||
|
|
@ -114,7 +114,7 @@ dmxBEAtom (DMXScreenInfo *dmxScreen,
|
|||
dmxScreen->atomTableSize = atom + 1;
|
||||
}
|
||||
|
||||
dmxScreen->beAtomTable[atom] = beAtom;
|
||||
dmxScreen->atomTable[atom] = beAtom;
|
||||
}
|
||||
|
||||
return beAtom;
|
||||
|
|
|
|||
|
|
@ -350,23 +350,13 @@ dmxRRUpdateOutputProperty (ScreenPtr pScreen,
|
|||
int format, status = !Success;
|
||||
unsigned long nElements, bytesAfter;
|
||||
Atom type, atom;
|
||||
char *name = NULL;
|
||||
INT32 *values = NULL;
|
||||
|
||||
output = dmxRRGetOutput (pScreen, dmxScreen, xoutput);
|
||||
if (!output)
|
||||
return TRUE; /* do nothing if the output doesn't exist */
|
||||
|
||||
XLIB_PROLOGUE (dmxScreen);
|
||||
name = XGetAtomName (dmxScreen->beDisplay, xproperty);
|
||||
XLIB_EPILOGUE (dmxScreen);
|
||||
|
||||
if (!name)
|
||||
return FALSE;
|
||||
|
||||
atom = MakeAtom (name, strlen (name), TRUE);
|
||||
|
||||
XFree (name);
|
||||
atom = dmxAtom (dmxScreen, xproperty);
|
||||
|
||||
XLIB_PROLOGUE (dmxScreen);
|
||||
status = XRRGetOutputProperty (dmxScreen->beDisplay, xoutput, xproperty,
|
||||
|
|
@ -403,38 +393,12 @@ dmxRRUpdateOutputProperty (ScreenPtr pScreen,
|
|||
int i;
|
||||
|
||||
for (i = 0; i < nElements; i++)
|
||||
{
|
||||
name = NULL;
|
||||
|
||||
XLIB_PROLOGUE (dmxScreen);
|
||||
name = XGetAtomName (dmxScreen->beDisplay, atoms[i]);
|
||||
XLIB_EPILOGUE (dmxScreen);
|
||||
|
||||
if (!name)
|
||||
return FALSE;
|
||||
|
||||
atoms[i] = MakeAtom (name, strlen (name), TRUE);
|
||||
|
||||
XFree (name);
|
||||
}
|
||||
atoms[i] = dmxAtom (dmxScreen, atoms[i]);
|
||||
|
||||
if (!info->range && info->num_values > 0)
|
||||
{
|
||||
for (i = 0; i < info->num_values; i++)
|
||||
{
|
||||
name = NULL;
|
||||
|
||||
XLIB_PROLOGUE (dmxScreen);
|
||||
name = XGetAtomName (dmxScreen->beDisplay, values[i]);
|
||||
XLIB_EPILOGUE (dmxScreen);
|
||||
|
||||
if (!name)
|
||||
return FALSE;
|
||||
|
||||
values[i] = MakeAtom (name, strlen (name), TRUE);
|
||||
|
||||
XFree (name);
|
||||
}
|
||||
values[i] = dmxAtom (dmxScreen, values[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
#include "dmxcb.h"
|
||||
#include "dmxinit.h"
|
||||
#include "dmxgrab.h"
|
||||
#include "dmxatom.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
|
|
@ -497,7 +498,6 @@ dmxScreenEventCheckManageWindow (ScreenPtr pScreen,
|
|||
)
|
||||
{
|
||||
XID vlist[8];
|
||||
char *name = NULL;
|
||||
Atom type;
|
||||
int mask, i = 0;
|
||||
int status = Success;
|
||||
|
|
@ -616,15 +616,7 @@ dmxScreenEventCheckManageWindow (ScreenPtr pScreen,
|
|||
x.u.u.detail = xclient->format;
|
||||
x.u.clientMessage.window = pChild->drawable.id;
|
||||
|
||||
/* ROUNDTRIP: if name is not cached by xlib */
|
||||
XLIB_PROLOGUE (dmxScreen);
|
||||
name = XGetAtomName (dmxScreen->beDisplay, xclient->type);
|
||||
XLIB_EPILOGUE (dmxScreen);
|
||||
|
||||
if (!name)
|
||||
break;
|
||||
|
||||
type = MakeAtom (name, strlen (name), TRUE);
|
||||
type = dmxAtom (dmxScreen, xclient->type);
|
||||
|
||||
switch (xclient->format) {
|
||||
case 8:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue