Merge branch 'master' into mpx
Conflicts: dix/devices.c dix/events.c mi/misprite.c
This commit is contained in:
commit
015d728bcd
|
@ -496,11 +496,11 @@ int __glXDispSwap_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
|
||||||
GLXDrawable *drawId;
|
GLXDrawable *drawId;
|
||||||
int *buffer;
|
int *buffer;
|
||||||
|
|
||||||
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
|
|
||||||
(void) drawId;
|
(void) drawId;
|
||||||
(void) buffer;
|
(void) buffer;
|
||||||
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
|
||||||
__GLX_SWAP_SHORT(&req->length);
|
__GLX_SWAP_SHORT(&req->length);
|
||||||
|
|
|
@ -495,6 +495,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
|
||||||
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
|
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
|
||||||
context->base.copy = __glXDRIcontextCopy;
|
context->base.copy = __glXDRIcontextCopy;
|
||||||
context->base.forceCurrent = __glXDRIcontextForceCurrent;
|
context->base.forceCurrent = __glXDRIcontextForceCurrent;
|
||||||
|
context->base.pScreen = screen->base.pScreen;
|
||||||
|
|
||||||
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
|
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
|
||||||
|
|
||||||
|
|
23
Xext/shm.c
23
Xext/shm.c
|
@ -119,9 +119,7 @@ static int pixmapFormat;
|
||||||
static int shmPixFormat[MAXSCREENS];
|
static int shmPixFormat[MAXSCREENS];
|
||||||
static ShmFuncsPtr shmFuncs[MAXSCREENS];
|
static ShmFuncsPtr shmFuncs[MAXSCREENS];
|
||||||
static DestroyPixmapProcPtr destroyPixmap[MAXSCREENS];
|
static DestroyPixmapProcPtr destroyPixmap[MAXSCREENS];
|
||||||
#ifdef PIXPRIV
|
|
||||||
static int shmPixmapPrivate;
|
static int shmPixmapPrivate;
|
||||||
#endif
|
|
||||||
static ShmFuncs miFuncs = {NULL, miShmPutImage};
|
static ShmFuncs miFuncs = {NULL, miShmPutImage};
|
||||||
static ShmFuncs fbFuncs = {fbShmCreatePixmap, fbShmPutImage};
|
static ShmFuncs fbFuncs = {fbShmCreatePixmap, fbShmPutImage};
|
||||||
|
|
||||||
|
@ -237,7 +235,6 @@ ShmExtensionInit(INITARGS)
|
||||||
destroyPixmap[i] = screenInfo.screens[i]->DestroyPixmap;
|
destroyPixmap[i] = screenInfo.screens[i]->DestroyPixmap;
|
||||||
screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap;
|
screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap;
|
||||||
}
|
}
|
||||||
#ifdef PIXPRIV
|
|
||||||
shmPixmapPrivate = AllocatePixmapPrivateIndex();
|
shmPixmapPrivate = AllocatePixmapPrivateIndex();
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
{
|
{
|
||||||
|
@ -245,7 +242,6 @@ ShmExtensionInit(INITARGS)
|
||||||
shmPixmapPrivate, 0))
|
shmPixmapPrivate, 0))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ShmSegType = CreateNewResourceType(ShmDetachSegment);
|
ShmSegType = CreateNewResourceType(ShmDetachSegment);
|
||||||
|
@ -299,22 +295,7 @@ ShmDestroyPixmap (PixmapPtr pPixmap)
|
||||||
if (pPixmap->refcnt == 1)
|
if (pPixmap->refcnt == 1)
|
||||||
{
|
{
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
#ifdef PIXPRIV
|
|
||||||
shmdesc = (ShmDescPtr) pPixmap->devPrivates[shmPixmapPrivate].ptr;
|
shmdesc = (ShmDescPtr) pPixmap->devPrivates[shmPixmapPrivate].ptr;
|
||||||
#else
|
|
||||||
char *base = (char *) pPixmap->devPrivate.ptr;
|
|
||||||
|
|
||||||
if (base != (pointer) (pPixmap + 1))
|
|
||||||
{
|
|
||||||
for (shmdesc = Shmsegs; shmdesc; shmdesc = shmdesc->next)
|
|
||||||
{
|
|
||||||
if (shmdesc->addr <= base && base <= shmdesc->addr + shmdesc->size)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
shmdesc = 0;
|
|
||||||
#endif
|
|
||||||
if (shmdesc)
|
if (shmdesc)
|
||||||
ShmDetachSegment ((pointer) shmdesc, pPixmap->drawable.id);
|
ShmDetachSegment ((pointer) shmdesc, pPixmap->drawable.id);
|
||||||
}
|
}
|
||||||
|
@ -781,9 +762,7 @@ CreatePmap:
|
||||||
shmdesc->addr + stuff->offset);
|
shmdesc->addr + stuff->offset);
|
||||||
|
|
||||||
if (pMap) {
|
if (pMap) {
|
||||||
#ifdef PIXPRIV
|
|
||||||
pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc;
|
pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc;
|
||||||
#endif
|
|
||||||
shmdesc->refcnt++;
|
shmdesc->refcnt++;
|
||||||
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||||
pMap->drawable.id = newPix->info[j].id;
|
pMap->drawable.id = newPix->info[j].id;
|
||||||
|
@ -1097,9 +1076,7 @@ CreatePmap:
|
||||||
shmdesc->addr + stuff->offset);
|
shmdesc->addr + stuff->offset);
|
||||||
if (pMap)
|
if (pMap)
|
||||||
{
|
{
|
||||||
#ifdef PIXPRIV
|
|
||||||
pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc;
|
pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc;
|
||||||
#endif
|
|
||||||
shmdesc->refcnt++;
|
shmdesc->refcnt++;
|
||||||
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||||
pMap->drawable.id = stuff->pid;
|
pMap->drawable.id = stuff->pid;
|
||||||
|
|
|
@ -102,12 +102,8 @@ afbCreatePixmap(pScreen, width, height, depth)
|
||||||
pPixmap->drawable.height = height;
|
pPixmap->drawable.height = height;
|
||||||
pPixmap->devKind = paddedWidth;
|
pPixmap->devKind = paddedWidth;
|
||||||
pPixmap->refcnt = 1;
|
pPixmap->refcnt = 1;
|
||||||
#ifdef PIXPRIV
|
|
||||||
pPixmap->devPrivate.ptr = datasize ?
|
pPixmap->devPrivate.ptr = datasize ?
|
||||||
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
||||||
#else
|
|
||||||
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
|
|
||||||
#endif
|
|
||||||
return(pPixmap);
|
return(pPixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,12 +96,8 @@ cfbCreatePixmap (pScreen, width, height, depth)
|
||||||
pPixmap->drawable.height = height;
|
pPixmap->drawable.height = height;
|
||||||
pPixmap->devKind = paddedWidth;
|
pPixmap->devKind = paddedWidth;
|
||||||
pPixmap->refcnt = 1;
|
pPixmap->refcnt = 1;
|
||||||
#ifdef PIXPRIV
|
|
||||||
pPixmap->devPrivate.ptr = datasize ?
|
pPixmap->devPrivate.ptr = datasize ?
|
||||||
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
||||||
#else
|
|
||||||
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
|
|
||||||
#endif
|
|
||||||
return pPixmap;
|
return pPixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1297,6 +1297,8 @@ return 0;}
|
||||||
# LDFLAGS=$save_LDFLAGS
|
# LDFLAGS=$save_LDFLAGS
|
||||||
# ])
|
# ])
|
||||||
xorg_cv_AGL_framework=no
|
xorg_cv_AGL_framework=no
|
||||||
|
DARWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
|
||||||
|
AC_SUBST([DARWIN_LIBS])
|
||||||
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
||||||
AC_SUBST([APPLE_APPLICATIONS_DIR])
|
AC_SUBST([APPLE_APPLICATIONS_DIR])
|
||||||
CFLAGS="${CFLAGS} -D__DARWIN__"
|
CFLAGS="${CFLAGS} -D__DARWIN__"
|
||||||
|
|
|
@ -77,10 +77,10 @@ void FreeAtom(NodePtr patom);
|
||||||
_X_EXPORT Atom
|
_X_EXPORT Atom
|
||||||
MakeAtom(char *string, unsigned len, Bool makeit)
|
MakeAtom(char *string, unsigned len, Bool makeit)
|
||||||
{
|
{
|
||||||
register NodePtr * np;
|
NodePtr * np;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
int comp;
|
int comp;
|
||||||
register unsigned int fp = 0;
|
unsigned int fp = 0;
|
||||||
|
|
||||||
np = &atomRoot;
|
np = &atomRoot;
|
||||||
for (i = 0; i < (len+1)/2; i++)
|
for (i = 0; i < (len+1)/2; i++)
|
||||||
|
@ -107,7 +107,7 @@ MakeAtom(char *string, unsigned len, Bool makeit)
|
||||||
}
|
}
|
||||||
if (makeit)
|
if (makeit)
|
||||||
{
|
{
|
||||||
register NodePtr nd;
|
NodePtr nd;
|
||||||
|
|
||||||
nd = (NodePtr) xalloc(sizeof(NodeRec));
|
nd = (NodePtr) xalloc(sizeof(NodeRec));
|
||||||
if (!nd)
|
if (!nd)
|
||||||
|
|
|
@ -95,8 +95,8 @@ static int BlueComp(
|
||||||
);
|
);
|
||||||
|
|
||||||
static void FreePixels(
|
static void FreePixels(
|
||||||
register ColormapPtr /*pmap*/,
|
ColormapPtr /*pmap*/,
|
||||||
register int /*client*/
|
int /*client*/
|
||||||
);
|
);
|
||||||
|
|
||||||
static void CopyFree(
|
static void CopyFree(
|
||||||
|
@ -259,9 +259,9 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
|
||||||
int class, size;
|
int class, size;
|
||||||
unsigned long sizebytes;
|
unsigned long sizebytes;
|
||||||
ColormapPtr pmap;
|
ColormapPtr pmap;
|
||||||
register EntryPtr pent;
|
EntryPtr pent;
|
||||||
int i;
|
int i;
|
||||||
register Pixel *ppix, **pptr;
|
Pixel *ppix, **pptr;
|
||||||
|
|
||||||
class = pVisual->class;
|
class = pVisual->class;
|
||||||
if(!(class & DynamicClass) && (alloc != AllocNone) && (client != SERVER_ID))
|
if(!(class & DynamicClass) && (alloc != AllocNone) && (client != SERVER_ID))
|
||||||
|
@ -429,7 +429,7 @@ int
|
||||||
FreeColormap (pointer value, XID mid)
|
FreeColormap (pointer value, XID mid)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
register EntryPtr pent;
|
EntryPtr pent;
|
||||||
ColormapPtr pmap = (ColormapPtr)value;
|
ColormapPtr pmap = (ColormapPtr)value;
|
||||||
|
|
||||||
if(CLIENT_ID(mid) != SERVER_ID)
|
if(CLIENT_ID(mid) != SERVER_ID)
|
||||||
|
@ -744,9 +744,9 @@ static void
|
||||||
UpdateColors (ColormapPtr pmap)
|
UpdateColors (ColormapPtr pmap)
|
||||||
{
|
{
|
||||||
xColorItem *defs;
|
xColorItem *defs;
|
||||||
register xColorItem *pdef;
|
xColorItem *pdef;
|
||||||
register EntryPtr pent;
|
EntryPtr pent;
|
||||||
register VisualPtr pVisual;
|
VisualPtr pVisual;
|
||||||
int i, n, size;
|
int i, n, size;
|
||||||
|
|
||||||
pVisual = pmap->pVisual;
|
pVisual = pmap->pVisual;
|
||||||
|
@ -993,14 +993,14 @@ AllocColor (ColormapPtr pmap,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
FakeAllocColor (register ColormapPtr pmap, register xColorItem *item)
|
FakeAllocColor (ColormapPtr pmap, xColorItem *item)
|
||||||
{
|
{
|
||||||
Pixel pixR, pixG, pixB;
|
Pixel pixR, pixG, pixB;
|
||||||
Pixel temp;
|
Pixel temp;
|
||||||
int entries;
|
int entries;
|
||||||
xrgb rgb;
|
xrgb rgb;
|
||||||
int class;
|
int class;
|
||||||
register VisualPtr pVisual;
|
VisualPtr pVisual;
|
||||||
|
|
||||||
pVisual = pmap->pVisual;
|
pVisual = pmap->pVisual;
|
||||||
rgb.red = item->red;
|
rgb.red = item->red;
|
||||||
|
@ -1059,9 +1059,9 @@ FakeAllocColor (register ColormapPtr pmap, register xColorItem *item)
|
||||||
|
|
||||||
/* free a pixel value obtained from FakeAllocColor */
|
/* free a pixel value obtained from FakeAllocColor */
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
FakeFreeColor(register ColormapPtr pmap, Pixel pixel)
|
FakeFreeColor(ColormapPtr pmap, Pixel pixel)
|
||||||
{
|
{
|
||||||
register VisualPtr pVisual;
|
VisualPtr pVisual;
|
||||||
Pixel pixR, pixG, pixB;
|
Pixel pixR, pixG, pixB;
|
||||||
|
|
||||||
switch (pmap->class) {
|
switch (pmap->class) {
|
||||||
|
@ -1507,10 +1507,10 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FreePixels(register ColormapPtr pmap, register int client)
|
FreePixels(ColormapPtr pmap, int client)
|
||||||
{
|
{
|
||||||
register Pixel *ppix, *ppixStart;
|
Pixel *ppix, *ppixStart;
|
||||||
register int n;
|
int n;
|
||||||
int class;
|
int class;
|
||||||
|
|
||||||
class = pmap->class;
|
class = pmap->class;
|
||||||
|
@ -1646,8 +1646,8 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors,
|
||||||
{
|
{
|
||||||
int ok;
|
int ok;
|
||||||
Pixel mask, *ppixFirst;
|
Pixel mask, *ppixFirst;
|
||||||
register Pixel shift;
|
Pixel shift;
|
||||||
register int i;
|
int i;
|
||||||
int class;
|
int class;
|
||||||
int oldcount;
|
int oldcount;
|
||||||
colorResource *pcr = (colorResource *)NULL;
|
colorResource *pcr = (colorResource *)NULL;
|
||||||
|
@ -2409,10 +2409,10 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
StoreColors (ColormapPtr pmap, int count, xColorItem *defs)
|
StoreColors (ColormapPtr pmap, int count, xColorItem *defs)
|
||||||
{
|
{
|
||||||
register Pixel pix;
|
Pixel pix;
|
||||||
register xColorItem *pdef;
|
xColorItem *pdef;
|
||||||
register EntryPtr pent, pentT, pentLast;
|
EntryPtr pent, pentT, pentLast;
|
||||||
register VisualPtr pVisual;
|
VisualPtr pVisual;
|
||||||
SHAREDCOLOR *pred, *pgreen, *pblue;
|
SHAREDCOLOR *pred, *pgreen, *pblue;
|
||||||
int n, ChgRed, ChgGreen, ChgBlue, idef;
|
int n, ChgRed, ChgGreen, ChgBlue, idef;
|
||||||
int class, errVal = Success;
|
int class, errVal = Success;
|
||||||
|
|
|
@ -87,7 +87,7 @@ FreeCursorBits(CursorBitsPtr bits)
|
||||||
#endif
|
#endif
|
||||||
if (bits->refcnt == 0)
|
if (bits->refcnt == 0)
|
||||||
{
|
{
|
||||||
register GlyphSharePtr *prev, this;
|
GlyphSharePtr *prev, this;
|
||||||
|
|
||||||
for (prev = &sharedGlyphs;
|
for (prev = &sharedGlyphs;
|
||||||
(this = *prev) && (this->bits != bits);
|
(this = *prev) && (this->bits != bits);
|
||||||
|
@ -142,7 +142,7 @@ FreeCursor(pointer value, XID cid)
|
||||||
static void
|
static void
|
||||||
CheckForEmptyMask(CursorBitsPtr bits)
|
CheckForEmptyMask(CursorBitsPtr bits)
|
||||||
{
|
{
|
||||||
register unsigned char *msk = bits->mask;
|
unsigned char *msk = bits->mask;
|
||||||
int n = BitmapBytePad(bits->width) * bits->height;
|
int n = BitmapBytePad(bits->width) * bits->height;
|
||||||
|
|
||||||
bits->emptyMask = FALSE;
|
bits->emptyMask = FALSE;
|
||||||
|
@ -341,8 +341,8 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
|
||||||
}
|
}
|
||||||
if (!maskfont)
|
if (!maskfont)
|
||||||
{
|
{
|
||||||
register long n;
|
long n;
|
||||||
register unsigned char *mskptr;
|
unsigned char *mskptr;
|
||||||
|
|
||||||
n = BitmapBytePad(cm.width)*(long)cm.height;
|
n = BitmapBytePad(cm.width)*(long)cm.height;
|
||||||
mskptr = mskbits = (unsigned char *)xalloc(n);
|
mskptr = mskbits = (unsigned char *)xalloc(n);
|
||||||
|
|
|
@ -87,7 +87,7 @@ static ClientPtr pairingClient = NULL;
|
||||||
DeviceIntPtr
|
DeviceIntPtr
|
||||||
AddInputDevice(DeviceProc deviceProc, Bool autoStart)
|
AddInputDevice(DeviceProc deviceProc, Bool autoStart)
|
||||||
{
|
{
|
||||||
register DeviceIntPtr dev, *prev; /* not a typo */
|
DeviceIntPtr dev, *prev; /* not a typo */
|
||||||
|
|
||||||
if (inputInfo.numDevices >= MAX_DEVICES)
|
if (inputInfo.numDevices >= MAX_DEVICES)
|
||||||
return (DeviceIntPtr)NULL;
|
return (DeviceIntPtr)NULL;
|
||||||
|
@ -156,9 +156,9 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart)
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
EnableDevice(register DeviceIntPtr dev)
|
EnableDevice(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
register DeviceIntPtr *prev;
|
DeviceIntPtr *prev;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
for (prev = &inputInfo.off_devices;
|
for (prev = &inputInfo.off_devices;
|
||||||
|
@ -182,9 +182,9 @@ EnableDevice(register DeviceIntPtr dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
DisableDevice(register DeviceIntPtr dev)
|
DisableDevice(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
register DeviceIntPtr *prev;
|
DeviceIntPtr *prev;
|
||||||
|
|
||||||
for (prev = &inputInfo.devices;
|
for (prev = &inputInfo.devices;
|
||||||
*prev && (*prev != dev);
|
*prev && (*prev != dev);
|
||||||
|
@ -336,7 +336,7 @@ CorePointerProc(DeviceIntPtr pDev, int what)
|
||||||
void
|
void
|
||||||
InitCoreDevices()
|
InitCoreDevices()
|
||||||
{
|
{
|
||||||
register DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
|
|
||||||
if (CoreDevicePrivatesGeneration != serverGeneration) {
|
if (CoreDevicePrivatesGeneration != serverGeneration) {
|
||||||
CoreDevicePrivatesIndex = AllocateDevicePrivateIndex();
|
CoreDevicePrivatesIndex = AllocateDevicePrivateIndex();
|
||||||
|
@ -453,7 +453,7 @@ InitAndStartDevices()
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
CloseDevice(register DeviceIntPtr dev)
|
CloseDevice(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
KbdFeedbackPtr k, knext;
|
KbdFeedbackPtr k, knext;
|
||||||
PtrFeedbackPtr p, pnext;
|
PtrFeedbackPtr p, pnext;
|
||||||
|
@ -552,6 +552,9 @@ CloseDevice(register DeviceIntPtr dev)
|
||||||
PickPointer(clients[j]);
|
PickPointer(clients[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dev->devPrivates)
|
||||||
|
xfree(dev->devPrivates);
|
||||||
|
|
||||||
xfree(dev->coreGrab.sync.event);
|
xfree(dev->coreGrab.sync.event);
|
||||||
xfree(dev->deviceGrab.sync.event);
|
xfree(dev->deviceGrab.sync.event);
|
||||||
xfree(dev);
|
xfree(dev);
|
||||||
|
@ -560,7 +563,7 @@ CloseDevice(register DeviceIntPtr dev)
|
||||||
void
|
void
|
||||||
CloseDownDevices()
|
CloseDownDevices()
|
||||||
{
|
{
|
||||||
register DeviceIntPtr dev, next;
|
DeviceIntPtr dev, next;
|
||||||
|
|
||||||
for (dev = inputInfo.devices; dev; dev = next)
|
for (dev = inputInfo.devices; dev; dev = next)
|
||||||
{
|
{
|
||||||
|
@ -692,7 +695,7 @@ QueryMinMaxKeyCodes(KeyCode *minCode, KeyCode *maxCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src)
|
SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int rowDif = src->minKeyCode - dst->minKeyCode;
|
int rowDif = src->minKeyCode - dst->minKeyCode;
|
||||||
|
@ -741,7 +744,7 @@ SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
InitModMap(register KeyClassPtr keyc)
|
InitModMap(KeyClassPtr keyc)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
CARD8 keysPerModifier[8];
|
CARD8 keysPerModifier[8];
|
||||||
|
@ -786,7 +789,7 @@ _X_EXPORT Bool
|
||||||
InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers[])
|
InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
register KeyClassPtr keyc;
|
KeyClassPtr keyc;
|
||||||
|
|
||||||
keyc = (KeyClassPtr)xalloc(sizeof(KeyClassRec));
|
keyc = (KeyClassPtr)xalloc(sizeof(KeyClassRec));
|
||||||
if (!keyc)
|
if (!keyc)
|
||||||
|
@ -821,10 +824,10 @@ InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
InitButtonClassDeviceStruct(register DeviceIntPtr dev, int numButtons,
|
InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons,
|
||||||
CARD8 *map)
|
CARD8 *map)
|
||||||
{
|
{
|
||||||
register ButtonClassPtr butc;
|
ButtonClassPtr butc;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
butc = (ButtonClassPtr)xalloc(sizeof(ButtonClassRec));
|
butc = (ButtonClassPtr)xalloc(sizeof(ButtonClassRec));
|
||||||
|
@ -850,7 +853,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
|
||||||
int numMotionEvents, int mode)
|
int numMotionEvents, int mode)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
register ValuatorClassPtr valc;
|
ValuatorClassPtr valc;
|
||||||
|
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -892,7 +895,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
|
InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
register AbsoluteClassPtr abs;
|
AbsoluteClassPtr abs;
|
||||||
|
|
||||||
abs = (AbsoluteClassPtr)xalloc(sizeof(AbsoluteClassRec));
|
abs = (AbsoluteClassPtr)xalloc(sizeof(AbsoluteClassRec));
|
||||||
if (!abs)
|
if (!abs)
|
||||||
|
@ -922,7 +925,7 @@ InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
InitFocusClassDeviceStruct(DeviceIntPtr dev)
|
InitFocusClassDeviceStruct(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
register FocusClassPtr focc;
|
FocusClassPtr focc;
|
||||||
|
|
||||||
focc = (FocusClassPtr)xalloc(sizeof(FocusClassRec));
|
focc = (FocusClassPtr)xalloc(sizeof(FocusClassRec));
|
||||||
if (!focc)
|
if (!focc)
|
||||||
|
@ -941,7 +944,7 @@ _X_EXPORT Bool
|
||||||
InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc,
|
InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc,
|
||||||
KbdCtrlProcPtr controlProc)
|
KbdCtrlProcPtr controlProc)
|
||||||
{
|
{
|
||||||
register KbdFeedbackPtr feedc;
|
KbdFeedbackPtr feedc;
|
||||||
|
|
||||||
feedc = (KbdFeedbackPtr)xalloc(sizeof(KbdFeedbackClassRec));
|
feedc = (KbdFeedbackPtr)xalloc(sizeof(KbdFeedbackClassRec));
|
||||||
if (!feedc)
|
if (!feedc)
|
||||||
|
@ -968,7 +971,7 @@ InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc,
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
|
InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
|
||||||
{
|
{
|
||||||
register PtrFeedbackPtr feedc;
|
PtrFeedbackPtr feedc;
|
||||||
|
|
||||||
feedc = (PtrFeedbackPtr)xalloc(sizeof(PtrFeedbackClassRec));
|
feedc = (PtrFeedbackPtr)xalloc(sizeof(PtrFeedbackClassRec));
|
||||||
if (!feedc)
|
if (!feedc)
|
||||||
|
@ -1006,7 +1009,7 @@ InitStringFeedbackClassDeviceStruct (
|
||||||
int max_symbols, int num_symbols_supported, KeySym *symbols)
|
int max_symbols, int num_symbols_supported, KeySym *symbols)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
register StringFeedbackPtr feedc;
|
StringFeedbackPtr feedc;
|
||||||
|
|
||||||
feedc = (StringFeedbackPtr)xalloc(sizeof(StringFeedbackClassRec));
|
feedc = (StringFeedbackPtr)xalloc(sizeof(StringFeedbackClassRec));
|
||||||
if (!feedc)
|
if (!feedc)
|
||||||
|
@ -1044,7 +1047,7 @@ _X_EXPORT Bool
|
||||||
InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc,
|
InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc,
|
||||||
BellCtrlProcPtr controlProc)
|
BellCtrlProcPtr controlProc)
|
||||||
{
|
{
|
||||||
register BellFeedbackPtr feedc;
|
BellFeedbackPtr feedc;
|
||||||
|
|
||||||
feedc = (BellFeedbackPtr)xalloc(sizeof(BellFeedbackClassRec));
|
feedc = (BellFeedbackPtr)xalloc(sizeof(BellFeedbackClassRec));
|
||||||
if (!feedc)
|
if (!feedc)
|
||||||
|
@ -1063,7 +1066,7 @@ InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc,
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
|
InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
|
||||||
{
|
{
|
||||||
register LedFeedbackPtr feedc;
|
LedFeedbackPtr feedc;
|
||||||
|
|
||||||
feedc = (LedFeedbackPtr)xalloc(sizeof(LedFeedbackClassRec));
|
feedc = (LedFeedbackPtr)xalloc(sizeof(LedFeedbackClassRec));
|
||||||
if (!feedc)
|
if (!feedc)
|
||||||
|
@ -1084,7 +1087,7 @@ InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr controlProc)
|
InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr controlProc)
|
||||||
{
|
{
|
||||||
register IntegerFeedbackPtr feedc;
|
IntegerFeedbackPtr feedc;
|
||||||
|
|
||||||
feedc = (IntegerFeedbackPtr)xalloc(sizeof(IntegerFeedbackClassRec));
|
feedc = (IntegerFeedbackPtr)xalloc(sizeof(IntegerFeedbackClassRec));
|
||||||
if (!feedc)
|
if (!feedc)
|
||||||
|
@ -1169,9 +1172,9 @@ SendMappingNotify(DeviceIntPtr pDev, unsigned request, unsigned firstKeyCode,
|
||||||
* sort it to do the checking. How often is it called? Just being lazy?
|
* sort it to do the checking. How often is it called? Just being lazy?
|
||||||
*/
|
*/
|
||||||
Bool
|
Bool
|
||||||
BadDeviceMap(register BYTE *buff, int length, unsigned low, unsigned high, XID *errval)
|
BadDeviceMap(BYTE *buff, int length, unsigned low, unsigned high, XID *errval)
|
||||||
{
|
{
|
||||||
register int i, j;
|
int i, j;
|
||||||
|
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
if (buff[i]) /* only check non-zero elements */
|
if (buff[i]) /* only check non-zero elements */
|
||||||
|
@ -1193,12 +1196,12 @@ BadDeviceMap(register BYTE *buff, int length, unsigned low, unsigned high, XID *
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
AllModifierKeysAreUp(dev, map1, per1, map2, per2)
|
AllModifierKeysAreUp(dev, map1, per1, map2, per2)
|
||||||
register DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
register CARD8 *map1, *map2;
|
CARD8 *map1, *map2;
|
||||||
int per1, per2;
|
int per1, per2;
|
||||||
{
|
{
|
||||||
register int i, j, k;
|
int i, j, k;
|
||||||
register CARD8 *down = dev->key->down;
|
CARD8 *down = dev->key->down;
|
||||||
|
|
||||||
for (i = 8; --i >= 0; map2 += per2)
|
for (i = 8; --i >= 0; map2 += per2)
|
||||||
{
|
{
|
||||||
|
@ -1315,7 +1318,7 @@ int
|
||||||
ProcGetModifierMapping(ClientPtr client)
|
ProcGetModifierMapping(ClientPtr client)
|
||||||
{
|
{
|
||||||
xGetModifierMappingReply rep;
|
xGetModifierMappingReply rep;
|
||||||
register KeyClassPtr keyc = inputInfo.keyboard->key;
|
KeyClassPtr keyc = inputInfo.keyboard->key;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xReq);
|
REQUEST_SIZE_MATCH(xReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
@ -1524,7 +1527,7 @@ NoteLedState(DeviceIntPtr keybd, int led, Bool on)
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
Ones(unsigned long mask) /* HACKMEM 169 */
|
Ones(unsigned long mask) /* HACKMEM 169 */
|
||||||
{
|
{
|
||||||
register unsigned long y;
|
unsigned long y;
|
||||||
|
|
||||||
y = (mask >> 1) &033333333333;
|
y = (mask >> 1) &033333333333;
|
||||||
y = mask - y - ((y >>1) & 033333333333);
|
y = mask - y - ((y >>1) & 033333333333);
|
||||||
|
@ -1741,7 +1744,7 @@ int
|
||||||
ProcGetKeyboardControl (ClientPtr client)
|
ProcGetKeyboardControl (ClientPtr client)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
register KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl;
|
KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl;
|
||||||
xGetKeyboardControlReply rep;
|
xGetKeyboardControlReply rep;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xReq);
|
REQUEST_SIZE_MATCH(xReq);
|
||||||
|
@ -1763,7 +1766,7 @@ ProcGetKeyboardControl (ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcBell(ClientPtr client)
|
ProcBell(ClientPtr client)
|
||||||
{
|
{
|
||||||
register DeviceIntPtr keybd = inputInfo.keyboard;
|
DeviceIntPtr keybd = inputInfo.keyboard;
|
||||||
int base = keybd->kbdfeed->ctrl.bell;
|
int base = keybd->kbdfeed->ctrl.bell;
|
||||||
int newpercent;
|
int newpercent;
|
||||||
REQUEST(xBellReq);
|
REQUEST(xBellReq);
|
||||||
|
@ -1888,7 +1891,7 @@ ProcGetPointerControl(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MaybeStopHint(register DeviceIntPtr dev, ClientPtr client)
|
MaybeStopHint(DeviceIntPtr dev, ClientPtr client)
|
||||||
{
|
{
|
||||||
GrabPtr grab = dev->coreGrab.grab;
|
GrabPtr grab = dev->coreGrab.grab;
|
||||||
|
|
||||||
|
|
241
dix/dispatch.c
241
dix/dispatch.c
|
@ -262,7 +262,7 @@ void
|
||||||
FlushClientCaches(XID id)
|
FlushClientCaches(XID id)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
register ClientPtr client;
|
ClientPtr client;
|
||||||
|
|
||||||
client = clients[CLIENT_ID(id)];
|
client = clients[CLIENT_ID(id)];
|
||||||
if (client == NullClient)
|
if (client == NullClient)
|
||||||
|
@ -394,11 +394,11 @@ SmartScheduleClient (int *clientReady, int nready)
|
||||||
void
|
void
|
||||||
Dispatch(void)
|
Dispatch(void)
|
||||||
{
|
{
|
||||||
register int *clientReady; /* array of request ready clients */
|
int *clientReady; /* array of request ready clients */
|
||||||
register int result;
|
int result;
|
||||||
register ClientPtr client;
|
ClientPtr client;
|
||||||
register int nready;
|
int nready;
|
||||||
register HWEventQueuePtr* icheck = checkForInput;
|
HWEventQueuePtr* icheck = checkForInput;
|
||||||
#ifdef SMART_SCHEDULE
|
#ifdef SMART_SCHEDULE
|
||||||
long start_tick;
|
long start_tick;
|
||||||
#endif
|
#endif
|
||||||
|
@ -594,11 +594,11 @@ ProcCreateWindow(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcChangeWindowAttributes(register ClientPtr client)
|
ProcChangeWindowAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xChangeWindowAttributesReq);
|
REQUEST(xChangeWindowAttributesReq);
|
||||||
register int result;
|
int result;
|
||||||
int len, rc;
|
int len, rc;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
|
REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
|
||||||
|
@ -619,7 +619,7 @@ ProcChangeWindowAttributes(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcGetWindowAttributes(register ClientPtr client)
|
ProcGetWindowAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -636,7 +636,7 @@ ProcGetWindowAttributes(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcDestroyWindow(register ClientPtr client)
|
ProcDestroyWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -652,7 +652,7 @@ ProcDestroyWindow(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcDestroySubwindows(register ClientPtr client)
|
ProcDestroySubwindows(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -667,11 +667,11 @@ ProcDestroySubwindows(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcChangeSaveSet(register ClientPtr client)
|
ProcChangeSaveSet(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xChangeSaveSetReq);
|
REQUEST(xChangeSaveSetReq);
|
||||||
register int result, rc;
|
int result, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xChangeSaveSetReq);
|
REQUEST_SIZE_MATCH(xChangeSaveSetReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
|
||||||
|
@ -695,11 +695,11 @@ ProcChangeSaveSet(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcReparentWindow(register ClientPtr client)
|
ProcReparentWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin, pParent;
|
WindowPtr pWin, pParent;
|
||||||
REQUEST(xReparentWindowReq);
|
REQUEST(xReparentWindowReq);
|
||||||
register int result, rc;
|
int result, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xReparentWindowReq);
|
REQUEST_SIZE_MATCH(xReparentWindowReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
|
||||||
|
@ -728,7 +728,7 @@ ProcReparentWindow(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcMapWindow(register ClientPtr client)
|
ProcMapWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -744,7 +744,7 @@ ProcMapWindow(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcMapSubwindows(register ClientPtr client)
|
ProcMapSubwindows(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -760,7 +760,7 @@ ProcMapSubwindows(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcUnmapWindow(register ClientPtr client)
|
ProcUnmapWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -776,7 +776,7 @@ ProcUnmapWindow(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcUnmapSubwindows(register ClientPtr client)
|
ProcUnmapSubwindows(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -791,11 +791,11 @@ ProcUnmapSubwindows(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcConfigureWindow(register ClientPtr client)
|
ProcConfigureWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xConfigureWindowReq);
|
REQUEST(xConfigureWindowReq);
|
||||||
register int result;
|
int result;
|
||||||
int len, rc;
|
int len, rc;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
|
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
|
||||||
|
@ -814,7 +814,7 @@ ProcConfigureWindow(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCirculateWindow(register ClientPtr client)
|
ProcCirculateWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xCirculateWindowReq);
|
REQUEST(xCirculateWindowReq);
|
||||||
|
@ -835,7 +835,7 @@ ProcCirculateWindow(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
GetGeometry(ClientPtr client, xGetGeometryReply *rep)
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -865,7 +865,7 @@ GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
||||||
if ((pDraw->type == UNDRAWABLE_WINDOW) ||
|
if ((pDraw->type == UNDRAWABLE_WINDOW) ||
|
||||||
((pDraw->type == DRAWABLE_WINDOW) && (stuff->id == pDraw->id)))
|
((pDraw->type == DRAWABLE_WINDOW) && (stuff->id == pDraw->id)))
|
||||||
{
|
{
|
||||||
register WindowPtr pWin = (WindowPtr)pDraw;
|
WindowPtr pWin = (WindowPtr)pDraw;
|
||||||
rep->x = pWin->origin.x - wBorderWidth (pWin);
|
rep->x = pWin->origin.x - wBorderWidth (pWin);
|
||||||
rep->y = pWin->origin.y - wBorderWidth (pWin);
|
rep->y = pWin->origin.y - wBorderWidth (pWin);
|
||||||
rep->borderWidth = pWin->borderWidth;
|
rep->borderWidth = pWin->borderWidth;
|
||||||
|
@ -880,7 +880,7 @@ GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcGetGeometry(register ClientPtr client)
|
ProcGetGeometry(ClientPtr client)
|
||||||
{
|
{
|
||||||
xGetGeometryReply rep;
|
xGetGeometryReply rep;
|
||||||
int status;
|
int status;
|
||||||
|
@ -894,7 +894,7 @@ ProcGetGeometry(register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcQueryTree(register ClientPtr client)
|
ProcQueryTree(ClientPtr client)
|
||||||
{
|
{
|
||||||
xQueryTreeReply reply;
|
xQueryTreeReply reply;
|
||||||
int rc, numChildren = 0;
|
int rc, numChildren = 0;
|
||||||
|
@ -942,7 +942,7 @@ ProcQueryTree(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcInternAtom(register ClientPtr client)
|
ProcInternAtom(ClientPtr client)
|
||||||
{
|
{
|
||||||
Atom atom;
|
Atom atom;
|
||||||
char *tchar;
|
char *tchar;
|
||||||
|
@ -971,7 +971,7 @@ ProcInternAtom(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcGetAtomName(register ClientPtr client)
|
ProcGetAtomName(ClientPtr client)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
xGetAtomNameReply reply;
|
xGetAtomNameReply reply;
|
||||||
|
@ -1002,7 +1002,7 @@ extern int k5_bad();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcSetSelectionOwner(register ClientPtr client)
|
ProcSetSelectionOwner(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
TimeStamp time;
|
TimeStamp time;
|
||||||
|
@ -1097,7 +1097,7 @@ ProcSetSelectionOwner(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcGetSelectionOwner(register ClientPtr client)
|
ProcGetSelectionOwner(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
|
||||||
|
@ -1128,7 +1128,7 @@ ProcGetSelectionOwner(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcConvertSelection(register ClientPtr client)
|
ProcConvertSelection(ClientPtr client)
|
||||||
{
|
{
|
||||||
Bool paramsOkay;
|
Bool paramsOkay;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
|
@ -1188,7 +1188,7 @@ ProcConvertSelection(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcGrabServer(register ClientPtr client)
|
ProcGrabServer(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST_SIZE_MATCH(xReq);
|
REQUEST_SIZE_MATCH(xReq);
|
||||||
if (grabState != GrabNone && client != grabClient)
|
if (grabState != GrabNone && client != grabClient)
|
||||||
|
@ -1242,7 +1242,7 @@ UngrabServer(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcUngrabServer(register ClientPtr client)
|
ProcUngrabServer(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST_SIZE_MATCH(xReq);
|
REQUEST_SIZE_MATCH(xReq);
|
||||||
UngrabServer(client);
|
UngrabServer(client);
|
||||||
|
@ -1250,7 +1250,7 @@ ProcUngrabServer(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcTranslateCoords(register ClientPtr client)
|
ProcTranslateCoords(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xTranslateCoordsReq);
|
REQUEST(xTranslateCoordsReq);
|
||||||
|
|
||||||
|
@ -1327,7 +1327,7 @@ ProcTranslateCoords(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcOpenFont(register ClientPtr client)
|
ProcOpenFont(ClientPtr client)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
REQUEST(xOpenFontReq);
|
REQUEST(xOpenFontReq);
|
||||||
|
@ -1346,7 +1346,7 @@ ProcOpenFont(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCloseFont(register ClientPtr client)
|
ProcCloseFont(ClientPtr client)
|
||||||
{
|
{
|
||||||
FontPtr pFont;
|
FontPtr pFont;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -1367,11 +1367,11 @@ ProcCloseFont(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcQueryFont(register ClientPtr client)
|
ProcQueryFont(ClientPtr client)
|
||||||
{
|
{
|
||||||
xQueryFontReply *reply;
|
xQueryFontReply *reply;
|
||||||
FontPtr pFont;
|
FontPtr pFont;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xResourceReq);
|
REQUEST_SIZE_MATCH(xResourceReq);
|
||||||
|
@ -1425,7 +1425,7 @@ ProcQueryFont(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcQueryTextExtents(register ClientPtr client)
|
ProcQueryTextExtents(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xQueryTextExtentsReq);
|
REQUEST(xQueryTextExtentsReq);
|
||||||
xQueryTextExtentsReply reply;
|
xQueryTextExtentsReply reply;
|
||||||
|
@ -1475,7 +1475,7 @@ ProcQueryTextExtents(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcListFonts(register ClientPtr client)
|
ProcListFonts(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xListFontsReq);
|
REQUEST(xListFontsReq);
|
||||||
|
|
||||||
|
@ -1486,7 +1486,7 @@ ProcListFonts(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcListFontsWithInfo(register ClientPtr client)
|
ProcListFontsWithInfo(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xListFontsWithInfoReq);
|
REQUEST(xListFontsWithInfoReq);
|
||||||
|
|
||||||
|
@ -1508,13 +1508,13 @@ dixDestroyPixmap(pointer value, XID pid)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCreatePixmap(register ClientPtr client)
|
ProcCreatePixmap(ClientPtr client)
|
||||||
{
|
{
|
||||||
PixmapPtr pMap;
|
PixmapPtr pMap;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
REQUEST(xCreatePixmapReq);
|
REQUEST(xCreatePixmapReq);
|
||||||
DepthPtr pDepth;
|
DepthPtr pDepth;
|
||||||
register int i, rc;
|
int i, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCreatePixmapReq);
|
REQUEST_SIZE_MATCH(xCreatePixmapReq);
|
||||||
client->errorValue = stuff->pid;
|
client->errorValue = stuff->pid;
|
||||||
|
@ -1571,7 +1571,7 @@ CreatePmap:
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcFreePixmap(register ClientPtr client)
|
ProcFreePixmap(ClientPtr client)
|
||||||
{
|
{
|
||||||
PixmapPtr pMap;
|
PixmapPtr pMap;
|
||||||
|
|
||||||
|
@ -1593,7 +1593,7 @@ ProcFreePixmap(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCreateGC(register ClientPtr client)
|
ProcCreateGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
int error, rc;
|
int error, rc;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -1621,7 +1621,7 @@ ProcCreateGC(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcChangeGC(register ClientPtr client)
|
ProcChangeGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
int result;
|
int result;
|
||||||
|
@ -1648,7 +1648,7 @@ ProcChangeGC(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCopyGC(register ClientPtr client)
|
ProcCopyGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *dstGC;
|
GC *dstGC;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -1675,7 +1675,7 @@ ProcCopyGC(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcSetDashes(register ClientPtr client)
|
ProcSetDashes(ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
int result;
|
int result;
|
||||||
|
@ -1704,7 +1704,7 @@ ProcSetDashes(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcSetClipRectangles(register ClientPtr client)
|
ProcSetClipRectangles(ClientPtr client)
|
||||||
{
|
{
|
||||||
int nr, result;
|
int nr, result;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -1734,7 +1734,7 @@ ProcSetClipRectangles(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcFreeGC(register ClientPtr client)
|
ProcFreeGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -1750,7 +1750,7 @@ ProcFreeGC(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcClearToBackground(register ClientPtr client)
|
ProcClearToBackground(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xClearAreaReq);
|
REQUEST(xClearAreaReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
@ -1777,7 +1777,7 @@ ProcClearToBackground(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCopyArea(register ClientPtr client)
|
ProcCopyArea(ClientPtr client)
|
||||||
{
|
{
|
||||||
DrawablePtr pDst;
|
DrawablePtr pDst;
|
||||||
DrawablePtr pSrc;
|
DrawablePtr pSrc;
|
||||||
|
@ -1821,7 +1821,7 @@ ProcCopyArea(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCopyPlane(register ClientPtr client)
|
ProcCopyPlane(ClientPtr client)
|
||||||
{
|
{
|
||||||
DrawablePtr psrcDraw, pdstDraw;
|
DrawablePtr psrcDraw, pdstDraw;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -1872,7 +1872,7 @@ ProcCopyPlane(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcPolyPoint(register ClientPtr client)
|
ProcPolyPoint(ClientPtr client)
|
||||||
{
|
{
|
||||||
int npoint;
|
int npoint;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -1895,7 +1895,7 @@ ProcPolyPoint(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcPolyLine(register ClientPtr client)
|
ProcPolyLine(ClientPtr client)
|
||||||
{
|
{
|
||||||
int npoint;
|
int npoint;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -1918,7 +1918,7 @@ ProcPolyLine(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcPolySegment(register ClientPtr client)
|
ProcPolySegment(ClientPtr client)
|
||||||
{
|
{
|
||||||
int nsegs;
|
int nsegs;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -1937,7 +1937,7 @@ ProcPolySegment(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcPolyRectangle (register ClientPtr client)
|
ProcPolyRectangle (ClientPtr client)
|
||||||
{
|
{
|
||||||
int nrects;
|
int nrects;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -1957,7 +1957,7 @@ ProcPolyRectangle (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcPolyArc(register ClientPtr client)
|
ProcPolyArc(ClientPtr client)
|
||||||
{
|
{
|
||||||
int narcs;
|
int narcs;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -1976,7 +1976,7 @@ ProcPolyArc(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcFillPoly(register ClientPtr client)
|
ProcFillPoly(ClientPtr client)
|
||||||
{
|
{
|
||||||
int things;
|
int things;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -2007,7 +2007,7 @@ ProcFillPoly(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcPolyFillRectangle(register ClientPtr client)
|
ProcPolyFillRectangle(ClientPtr client)
|
||||||
{
|
{
|
||||||
int things;
|
int things;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -2028,7 +2028,7 @@ ProcPolyFillRectangle(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcPolyFillArc(register ClientPtr client)
|
ProcPolyFillArc(ClientPtr client)
|
||||||
{
|
{
|
||||||
int narcs;
|
int narcs;
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
|
@ -2101,7 +2101,7 @@ ReformatImage (char *base, int nbytes, int bpp, int order)
|
||||||
* boundary, even if the scanlines are padded to our satisfaction.
|
* boundary, even if the scanlines are padded to our satisfaction.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ProcPutImage(register ClientPtr client)
|
ProcPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -2159,13 +2159,13 @@ ProcPutImage(register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
DoGetImage(ClientPtr client, int format, Drawable drawable,
|
||||||
int x, int y, int width, int height,
|
int x, int y, int width, int height,
|
||||||
Mask planemask, xGetImageReply **im_return)
|
Mask planemask, xGetImageReply **im_return)
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
int nlines, linesPerBuf, rc;
|
int nlines, linesPerBuf, rc;
|
||||||
register int linesDone;
|
int linesDone;
|
||||||
long widthBytesLine, length;
|
long widthBytesLine, length;
|
||||||
Mask plane = 0;
|
Mask plane = 0;
|
||||||
char *pBuf;
|
char *pBuf;
|
||||||
|
@ -2379,7 +2379,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcGetImage(register ClientPtr client)
|
ProcGetImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xGetImageReq);
|
REQUEST(xGetImageReq);
|
||||||
|
|
||||||
|
@ -2392,7 +2392,7 @@ ProcGetImage(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcPolyText(register ClientPtr client)
|
ProcPolyText(ClientPtr client)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
REQUEST(xPolyTextReq);
|
REQUEST(xPolyTextReq);
|
||||||
|
@ -2421,7 +2421,7 @@ ProcPolyText(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcImageText8(register ClientPtr client)
|
ProcImageText8(ClientPtr client)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -2451,7 +2451,7 @@ ProcImageText8(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcImageText16(register ClientPtr client)
|
ProcImageText16(ClientPtr client)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -2482,7 +2482,7 @@ ProcImageText16(register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCreateColormap(register ClientPtr client)
|
ProcCreateColormap(ClientPtr client)
|
||||||
{
|
{
|
||||||
VisualPtr pVisual;
|
VisualPtr pVisual;
|
||||||
ColormapPtr pmap;
|
ColormapPtr pmap;
|
||||||
|
@ -2524,7 +2524,7 @@ ProcCreateColormap(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcFreeColormap(register ClientPtr client)
|
ProcFreeColormap(ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pmap;
|
ColormapPtr pmap;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -2548,7 +2548,7 @@ ProcFreeColormap(register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCopyColormapAndFree(register ClientPtr client)
|
ProcCopyColormapAndFree(ClientPtr client)
|
||||||
{
|
{
|
||||||
Colormap mid;
|
Colormap mid;
|
||||||
ColormapPtr pSrcMap;
|
ColormapPtr pSrcMap;
|
||||||
|
@ -2575,7 +2575,7 @@ ProcCopyColormapAndFree(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcInstallColormap(register ClientPtr client)
|
ProcInstallColormap(ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pcmp;
|
ColormapPtr pcmp;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -2596,7 +2596,7 @@ ProcInstallColormap(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcUninstallColormap(register ClientPtr client)
|
ProcUninstallColormap(ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pcmp;
|
ColormapPtr pcmp;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -2618,7 +2618,7 @@ ProcUninstallColormap(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcListInstalledColormaps(register ClientPtr client)
|
ProcListInstalledColormaps(ClientPtr client)
|
||||||
{
|
{
|
||||||
xListInstalledColormapsReply *preply;
|
xListInstalledColormapsReply *preply;
|
||||||
int nummaps, rc;
|
int nummaps, rc;
|
||||||
|
@ -2651,7 +2651,7 @@ ProcListInstalledColormaps(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcAllocColor (register ClientPtr client)
|
ProcAllocColor (ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pmap;
|
ColormapPtr pmap;
|
||||||
int retval;
|
int retval;
|
||||||
|
@ -2693,7 +2693,7 @@ ProcAllocColor (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcAllocNamedColor (register ClientPtr client)
|
ProcAllocNamedColor (ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pcmp;
|
ColormapPtr pcmp;
|
||||||
REQUEST(xAllocNamedColorReq);
|
REQUEST(xAllocNamedColorReq);
|
||||||
|
@ -2745,7 +2745,7 @@ ProcAllocNamedColor (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcAllocColorCells (register ClientPtr client)
|
ProcAllocColorCells (ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pcmp;
|
ColormapPtr pcmp;
|
||||||
REQUEST(xAllocColorCellsReq);
|
REQUEST(xAllocColorCellsReq);
|
||||||
|
@ -2811,7 +2811,7 @@ ProcAllocColorCells (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcAllocColorPlanes(register ClientPtr client)
|
ProcAllocColorPlanes(ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pcmp;
|
ColormapPtr pcmp;
|
||||||
REQUEST(xAllocColorPlanesReq);
|
REQUEST(xAllocColorPlanesReq);
|
||||||
|
@ -2875,7 +2875,7 @@ ProcAllocColorPlanes(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcFreeColors(register ClientPtr client)
|
ProcFreeColors(ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pcmp;
|
ColormapPtr pcmp;
|
||||||
REQUEST(xFreeColorsReq);
|
REQUEST(xFreeColorsReq);
|
||||||
|
@ -2944,7 +2944,7 @@ ProcStoreColors (ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcStoreNamedColor (register ClientPtr client)
|
ProcStoreNamedColor (ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pcmp;
|
ColormapPtr pcmp;
|
||||||
REQUEST(xStoreNamedColorReq);
|
REQUEST(xStoreNamedColorReq);
|
||||||
|
@ -2978,7 +2978,7 @@ ProcStoreNamedColor (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcQueryColors(register ClientPtr client)
|
ProcQueryColors(ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pcmp;
|
ColormapPtr pcmp;
|
||||||
REQUEST(xQueryColorsReq);
|
REQUEST(xQueryColorsReq);
|
||||||
|
@ -3029,7 +3029,7 @@ ProcQueryColors(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcLookupColor(register ClientPtr client)
|
ProcLookupColor(ClientPtr client)
|
||||||
{
|
{
|
||||||
ColormapPtr pcmp;
|
ColormapPtr pcmp;
|
||||||
REQUEST(xLookupColorReq);
|
REQUEST(xLookupColorReq);
|
||||||
|
@ -3067,12 +3067,11 @@ ProcLookupColor(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCreateCursor (register ClientPtr client)
|
ProcCreateCursor (ClientPtr client)
|
||||||
{
|
{
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
|
PixmapPtr src;
|
||||||
register PixmapPtr src;
|
PixmapPtr msk;
|
||||||
register PixmapPtr msk;
|
|
||||||
unsigned char * srcbits;
|
unsigned char * srcbits;
|
||||||
unsigned char * mskbits;
|
unsigned char * mskbits;
|
||||||
unsigned short width, height;
|
unsigned short width, height;
|
||||||
|
@ -3132,7 +3131,7 @@ ProcCreateCursor (register ClientPtr client)
|
||||||
XYPixmap, 1, (pointer)srcbits);
|
XYPixmap, 1, (pointer)srcbits);
|
||||||
if ( msk == (PixmapPtr)NULL)
|
if ( msk == (PixmapPtr)NULL)
|
||||||
{
|
{
|
||||||
register unsigned char *bits = mskbits;
|
unsigned char *bits = mskbits;
|
||||||
while (--n >= 0)
|
while (--n >= 0)
|
||||||
*bits++ = ~0;
|
*bits++ = ~0;
|
||||||
}
|
}
|
||||||
|
@ -3157,7 +3156,7 @@ ProcCreateCursor (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcCreateGlyphCursor (register ClientPtr client)
|
ProcCreateGlyphCursor (ClientPtr client)
|
||||||
{
|
{
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
int res;
|
int res;
|
||||||
|
@ -3181,7 +3180,7 @@ ProcCreateGlyphCursor (register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcFreeCursor (register ClientPtr client)
|
ProcFreeCursor (ClientPtr client)
|
||||||
{
|
{
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -3202,7 +3201,7 @@ ProcFreeCursor (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcQueryBestSize (register ClientPtr client)
|
ProcQueryBestSize (ClientPtr client)
|
||||||
{
|
{
|
||||||
xQueryBestSizeReply reply;
|
xQueryBestSizeReply reply;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -3239,7 +3238,7 @@ ProcQueryBestSize (register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcSetScreenSaver (register ClientPtr client)
|
ProcSetScreenSaver (ClientPtr client)
|
||||||
{
|
{
|
||||||
int blankingOption, exposureOption;
|
int blankingOption, exposureOption;
|
||||||
REQUEST(xSetScreenSaverReq);
|
REQUEST(xSetScreenSaverReq);
|
||||||
|
@ -3295,7 +3294,7 @@ ProcSetScreenSaver (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcGetScreenSaver(register ClientPtr client)
|
ProcGetScreenSaver(ClientPtr client)
|
||||||
{
|
{
|
||||||
xGetScreenSaverReply rep;
|
xGetScreenSaverReply rep;
|
||||||
|
|
||||||
|
@ -3312,7 +3311,7 @@ ProcGetScreenSaver(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcChangeHosts(register ClientPtr client)
|
ProcChangeHosts(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xChangeHostsReq);
|
REQUEST(xChangeHostsReq);
|
||||||
int result;
|
int result;
|
||||||
|
@ -3336,7 +3335,7 @@ ProcChangeHosts(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcListHosts(register ClientPtr client)
|
ProcListHosts(ClientPtr client)
|
||||||
{
|
{
|
||||||
xListHostsReply reply;
|
xListHostsReply reply;
|
||||||
int len, nHosts, result;
|
int len, nHosts, result;
|
||||||
|
@ -3367,7 +3366,7 @@ ProcListHosts(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcChangeAccessControl(register ClientPtr client)
|
ProcChangeAccessControl(ClientPtr client)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
REQUEST(xSetAccessControlReq);
|
REQUEST(xSetAccessControlReq);
|
||||||
|
@ -3385,7 +3384,7 @@ ProcChangeAccessControl(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcKillClient(register ClientPtr client)
|
ProcKillClient(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
ClientPtr killclient;
|
ClientPtr killclient;
|
||||||
|
@ -3417,7 +3416,7 @@ ProcKillClient(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcSetFontPath(register ClientPtr client)
|
ProcSetFontPath(ClientPtr client)
|
||||||
{
|
{
|
||||||
unsigned char *ptr;
|
unsigned char *ptr;
|
||||||
unsigned long nbytes, total;
|
unsigned long nbytes, total;
|
||||||
|
@ -3452,7 +3451,7 @@ ProcSetFontPath(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcGetFontPath(register ClientPtr client)
|
ProcGetFontPath(ClientPtr client)
|
||||||
{
|
{
|
||||||
xGetFontPathReply reply;
|
xGetFontPathReply reply;
|
||||||
int stringLens, numpaths;
|
int stringLens, numpaths;
|
||||||
|
@ -3474,7 +3473,7 @@ ProcGetFontPath(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcChangeCloseDownMode(register ClientPtr client)
|
ProcChangeCloseDownMode(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSetCloseDownModeReq);
|
REQUEST(xSetCloseDownModeReq);
|
||||||
|
|
||||||
|
@ -3493,7 +3492,7 @@ ProcChangeCloseDownMode(register ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ProcForceScreenSaver(register ClientPtr client)
|
int ProcForceScreenSaver(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xForceScreenSaverReq);
|
REQUEST(xForceScreenSaverReq);
|
||||||
|
|
||||||
|
@ -3509,7 +3508,7 @@ int ProcForceScreenSaver(register ClientPtr client)
|
||||||
return client->noClientException;
|
return client->noClientException;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ProcNoOperation(register ClientPtr client)
|
int ProcNoOperation(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST_AT_LEAST_SIZE(xReq);
|
REQUEST_AT_LEAST_SIZE(xReq);
|
||||||
|
|
||||||
|
@ -3552,7 +3551,7 @@ InitProcVectors(void)
|
||||||
char dispatchExceptionAtReset = DE_RESET;
|
char dispatchExceptionAtReset = DE_RESET;
|
||||||
|
|
||||||
void
|
void
|
||||||
CloseDownClient(register ClientPtr client)
|
CloseDownClient(ClientPtr client)
|
||||||
{
|
{
|
||||||
Bool really_close_down = client->clientGone ||
|
Bool really_close_down = client->clientGone ||
|
||||||
client->closeDownMode == DestroyAll;
|
client->closeDownMode == DestroyAll;
|
||||||
|
@ -3664,8 +3663,8 @@ KillAllClients()
|
||||||
void
|
void
|
||||||
CloseDownRetainedResources()
|
CloseDownRetainedResources()
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register ClientPtr client;
|
ClientPtr client;
|
||||||
|
|
||||||
for (i=1; i<currentMaxClients; i++)
|
for (i=1; i<currentMaxClients; i++)
|
||||||
{
|
{
|
||||||
|
@ -3737,11 +3736,11 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
|
||||||
int
|
int
|
||||||
InitClientPrivates(ClientPtr client)
|
InitClientPrivates(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char *ptr;
|
char *ptr;
|
||||||
DevUnion *ppriv;
|
DevUnion *ppriv;
|
||||||
register unsigned *sizes;
|
unsigned *sizes;
|
||||||
register unsigned size;
|
unsigned size;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
if (totalClientSize == sizeof(ClientRec))
|
if (totalClientSize == sizeof(ClientRec))
|
||||||
ppriv = (DevUnion *)NULL;
|
ppriv = (DevUnion *)NULL;
|
||||||
|
@ -3791,8 +3790,8 @@ InitClientPrivates(ClientPtr client)
|
||||||
|
|
||||||
ClientPtr NextAvailableClient(pointer ospriv)
|
ClientPtr NextAvailableClient(pointer ospriv)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register ClientPtr client;
|
ClientPtr client;
|
||||||
xReq data;
|
xReq data;
|
||||||
|
|
||||||
i = nextFreeClientID;
|
i = nextFreeClientID;
|
||||||
|
@ -3833,10 +3832,10 @@ ClientPtr NextAvailableClient(pointer ospriv)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcInitialConnection(register ClientPtr client)
|
ProcInitialConnection(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
register xConnClientPrefix *prefix;
|
xConnClientPrefix *prefix;
|
||||||
int whichbyte = 1;
|
int whichbyte = 1;
|
||||||
|
|
||||||
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
|
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
|
||||||
|
@ -3860,10 +3859,10 @@ ProcInitialConnection(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SendConnSetup(register ClientPtr client, char *reason)
|
SendConnSetup(ClientPtr client, char *reason)
|
||||||
{
|
{
|
||||||
register xWindowRoot *root;
|
xWindowRoot *root;
|
||||||
register int i;
|
int i;
|
||||||
int numScreens;
|
int numScreens;
|
||||||
char* lConnectionInfo;
|
char* lConnectionInfo;
|
||||||
xConnSetupPrefix* lconnSetupPrefix;
|
xConnSetupPrefix* lconnSetupPrefix;
|
||||||
|
@ -3918,8 +3917,8 @@ SendConnSetup(register ClientPtr client, char *reason)
|
||||||
|
|
||||||
for (i=0; i<numScreens; i++)
|
for (i=0; i<numScreens; i++)
|
||||||
{
|
{
|
||||||
register unsigned int j;
|
unsigned int j;
|
||||||
register xDepth *pDepth;
|
xDepth *pDepth;
|
||||||
|
|
||||||
root->currentInputMask = WindowTable[i]->eventMask |
|
root->currentInputMask = WindowTable[i]->eventMask |
|
||||||
wOtherEventMasks (WindowTable[i]);
|
wOtherEventMasks (WindowTable[i]);
|
||||||
|
@ -3960,10 +3959,10 @@ SendConnSetup(register ClientPtr client, char *reason)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcEstablishConnection(register ClientPtr client)
|
ProcEstablishConnection(ClientPtr client)
|
||||||
{
|
{
|
||||||
char *reason, *auth_proto, *auth_string;
|
char *reason, *auth_proto, *auth_string;
|
||||||
register xConnClientPrefix *prefix;
|
xConnClientPrefix *prefix;
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
|
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
|
||||||
|
@ -4012,7 +4011,7 @@ SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode,
|
||||||
void
|
void
|
||||||
DeleteWindowFromAnySelections(WindowPtr pWin)
|
DeleteWindowFromAnySelections(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i< NumCurrentSelections; i++)
|
for (i = 0; i< NumCurrentSelections; i++)
|
||||||
if (CurrentSelections[i].pWin == pWin)
|
if (CurrentSelections[i].pWin == pWin)
|
||||||
|
@ -4034,7 +4033,7 @@ DeleteWindowFromAnySelections(WindowPtr pWin)
|
||||||
static void
|
static void
|
||||||
DeleteClientFromAnySelections(ClientPtr client)
|
DeleteClientFromAnySelections(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i< NumCurrentSelections; i++)
|
for (i = 0; i< NumCurrentSelections; i++)
|
||||||
if (CurrentSelections[i].client == client)
|
if (CurrentSelections[i].client == client)
|
||||||
|
|
|
@ -1145,9 +1145,9 @@ static XID clearGC[] = { CT_NONE };
|
||||||
#define clearGCmask (GCClipMask)
|
#define clearGCmask (GCClipMask)
|
||||||
|
|
||||||
int
|
int
|
||||||
doPolyText(ClientPtr client, register PTclosurePtr c)
|
doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
{
|
{
|
||||||
register FontPtr pFont = c->pGC->font, oldpFont;
|
FontPtr pFont = c->pGC->font, oldpFont;
|
||||||
Font fid, oldfid;
|
Font fid, oldfid;
|
||||||
int err = Success, lgerr; /* err is in X error, not font error, space */
|
int err = Success, lgerr; /* err is in X error, not font error, space */
|
||||||
enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT;
|
enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT;
|
||||||
|
@ -1447,7 +1447,7 @@ PolyText(ClientPtr client, DrawablePtr pDraw, GC *pGC, unsigned char *pElt,
|
||||||
#undef FontShiftSize
|
#undef FontShiftSize
|
||||||
|
|
||||||
int
|
int
|
||||||
doImageText(ClientPtr client, register ITclosurePtr c)
|
doImageText(ClientPtr client, ITclosurePtr c)
|
||||||
{
|
{
|
||||||
int err = Success, lgerr; /* err is in X error, not font error, space */
|
int err = Success, lgerr; /* err is in X error, not font error, space */
|
||||||
FontPathElementPtr fpe;
|
FontPathElementPtr fpe;
|
||||||
|
|
|
@ -168,7 +168,7 @@ ISOLatin1ToLower (unsigned char source)
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
CopyISOLatin1Lowered(unsigned char *dest, unsigned char *source, int length)
|
CopyISOLatin1Lowered(unsigned char *dest, unsigned char *source, int length)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < length; i++, source++, dest++)
|
for (i = 0; i < length; i++, source++, dest++)
|
||||||
*dest = ISOLatin1ToLower (*source);
|
*dest = ISOLatin1ToLower (*source);
|
||||||
|
@ -392,8 +392,8 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
|
||||||
void
|
void
|
||||||
DeleteWindowFromAnySaveSet(WindowPtr pWin)
|
DeleteWindowFromAnySaveSet(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register ClientPtr client;
|
ClientPtr client;
|
||||||
|
|
||||||
for (i = 0; i< currentMaxClients; i++)
|
for (i = 0; i< currentMaxClients; i++)
|
||||||
{
|
{
|
||||||
|
@ -434,7 +434,7 @@ static Bool handlerDeleted;
|
||||||
void
|
void
|
||||||
BlockHandler(pointer pTimeout, pointer pReadmask)
|
BlockHandler(pointer pTimeout, pointer pReadmask)
|
||||||
{
|
{
|
||||||
register int i, j;
|
int i, j;
|
||||||
|
|
||||||
++inHandler;
|
++inHandler;
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
|
@ -468,7 +468,7 @@ BlockHandler(pointer pTimeout, pointer pReadmask)
|
||||||
void
|
void
|
||||||
WakeupHandler(int result, pointer pReadmask)
|
WakeupHandler(int result, pointer pReadmask)
|
||||||
{
|
{
|
||||||
register int i, j;
|
int i, j;
|
||||||
|
|
||||||
++inHandler;
|
++inHandler;
|
||||||
for (i = numHandlers - 1; i >= 0; i--)
|
for (i = numHandlers - 1; i >= 0; i--)
|
||||||
|
|
181
dix/events.c
181
dix/events.c
|
@ -805,9 +805,9 @@ CheckPhysLimits(
|
||||||
|
|
||||||
static void
|
static void
|
||||||
CheckVirtualMotion(
|
CheckVirtualMotion(
|
||||||
register DeviceIntPtr pDev,
|
DeviceIntPtr pDev,
|
||||||
register QdEventPtr qe,
|
QdEventPtr qe,
|
||||||
register WindowPtr pWin)
|
WindowPtr pWin)
|
||||||
{
|
{
|
||||||
SpritePtr pSprite = pDev->pSprite;
|
SpritePtr pSprite = pDev->pSprite;
|
||||||
|
|
||||||
|
@ -926,7 +926,7 @@ ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor)
|
||||||
|
|
||||||
/* returns true if b is a descendent of a */
|
/* returns true if b is a descendent of a */
|
||||||
Bool
|
Bool
|
||||||
IsParent(register WindowPtr a, register WindowPtr b)
|
IsParent(WindowPtr a, WindowPtr b)
|
||||||
{
|
{
|
||||||
for (b = b->parent; b; b = b->parent)
|
for (b = b->parent; b; b = b->parent)
|
||||||
if (b == a) return TRUE;
|
if (b == a) return TRUE;
|
||||||
|
@ -936,8 +936,8 @@ IsParent(register WindowPtr a, register WindowPtr b)
|
||||||
static void
|
static void
|
||||||
PostNewCursor(DeviceIntPtr pDev)
|
PostNewCursor(DeviceIntPtr pDev)
|
||||||
{
|
{
|
||||||
register WindowPtr win;
|
WindowPtr win;
|
||||||
register GrabPtr grab = pDev->coreGrab.grab;
|
GrabPtr grab = pDev->coreGrab.grab;
|
||||||
SpritePtr pSprite = pDev->pSprite;
|
SpritePtr pSprite = pDev->pSprite;
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
|
|
||||||
|
@ -1014,7 +1014,7 @@ XineramaGetCursorScreen(DeviceIntPtr pDev)
|
||||||
#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
|
#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
MonthChangedOrBadTime(register xEvent *xE)
|
MonthChangedOrBadTime(xEvent *xE)
|
||||||
{
|
{
|
||||||
/* If the ddx/OS is careless about not processing timestamped events from
|
/* If the ddx/OS is careless about not processing timestamped events from
|
||||||
* different sources in sorted order, then it's possible for time to go
|
* different sources in sorted order, then it's possible for time to go
|
||||||
|
@ -1033,7 +1033,7 @@ MonthChangedOrBadTime(register xEvent *xE)
|
||||||
lastDeviceEventTime = currentTime; }
|
lastDeviceEventTime = currentTime; }
|
||||||
|
|
||||||
void
|
void
|
||||||
NoticeEventTime(register xEvent *xE)
|
NoticeEventTime(xEvent *xE)
|
||||||
{
|
{
|
||||||
if (!syncEvents.playingEvents)
|
if (!syncEvents.playingEvents)
|
||||||
NoticeTime(xE);
|
NoticeTime(xE);
|
||||||
|
@ -1046,8 +1046,8 @@ NoticeEventTime(register xEvent *xE)
|
||||||
void
|
void
|
||||||
EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count)
|
EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count)
|
||||||
{
|
{
|
||||||
register QdEventPtr tail = *syncEvents.pendtail;
|
QdEventPtr tail = *syncEvents.pendtail;
|
||||||
register QdEventPtr qe;
|
QdEventPtr qe;
|
||||||
xEvent *qxE;
|
xEvent *qxE;
|
||||||
SpritePtr pSprite = device->pSprite;
|
SpritePtr pSprite = device->pSprite;
|
||||||
|
|
||||||
|
@ -1122,8 +1122,8 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count)
|
||||||
static void
|
static void
|
||||||
PlayReleasedEvents(void)
|
PlayReleasedEvents(void)
|
||||||
{
|
{
|
||||||
register QdEventPtr *prev, qe;
|
QdEventPtr *prev, qe;
|
||||||
register DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
DeviceIntPtr pDev;
|
DeviceIntPtr pDev;
|
||||||
|
|
||||||
prev = &syncEvents.pending;
|
prev = &syncEvents.pending;
|
||||||
|
@ -1169,7 +1169,7 @@ PlayReleasedEvents(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FreezeThaw(register DeviceIntPtr dev, Bool frozen)
|
FreezeThaw(DeviceIntPtr dev, Bool frozen)
|
||||||
{
|
{
|
||||||
dev->coreGrab.sync.frozen = frozen;
|
dev->coreGrab.sync.frozen = frozen;
|
||||||
if (frozen)
|
if (frozen)
|
||||||
|
@ -1181,13 +1181,13 @@ FreezeThaw(register DeviceIntPtr dev, Bool frozen)
|
||||||
void
|
void
|
||||||
ComputeFreezes()
|
ComputeFreezes()
|
||||||
{
|
{
|
||||||
register DeviceIntPtr replayDev = syncEvents.replayDev;
|
DeviceIntPtr replayDev = syncEvents.replayDev;
|
||||||
register int i;
|
int i;
|
||||||
WindowPtr w;
|
WindowPtr w;
|
||||||
register xEvent *xE;
|
xEvent *xE;
|
||||||
int count;
|
int count;
|
||||||
GrabPtr grab;
|
GrabPtr grab;
|
||||||
register DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
|
|
||||||
for (dev = inputInfo.devices; dev; dev = dev->next)
|
for (dev = inputInfo.devices; dev; dev = dev->next)
|
||||||
FreezeThaw(dev, dev->coreGrab.sync.other ||
|
FreezeThaw(dev, dev->coreGrab.sync.other ||
|
||||||
|
@ -1283,10 +1283,10 @@ ScreenRestructured (ScreenPtr pScreen)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
|
CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
|
||||||
{
|
{
|
||||||
register GrabPtr grab = thisDev->coreGrab.grab;
|
GrabPtr grab = thisDev->coreGrab.grab;
|
||||||
register DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
|
|
||||||
if (thisMode == GrabModeSync)
|
if (thisMode == GrabModeSync)
|
||||||
thisDev->coreGrab.sync.state = FROZEN_NO_EVENT;
|
thisDev->coreGrab.sync.state = FROZEN_NO_EVENT;
|
||||||
|
@ -1317,7 +1317,7 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
|
ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab,
|
||||||
TimeStamp time, Bool autoGrab)
|
TimeStamp time, Bool autoGrab)
|
||||||
{
|
{
|
||||||
WindowPtr oldWin = (mouse->coreGrab.grab) ?
|
WindowPtr oldWin = (mouse->coreGrab.grab) ?
|
||||||
|
@ -1347,10 +1347,10 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DeactivatePointerGrab(register DeviceIntPtr mouse)
|
DeactivatePointerGrab(DeviceIntPtr mouse)
|
||||||
{
|
{
|
||||||
register GrabPtr grab = mouse->coreGrab.grab;
|
GrabPtr grab = mouse->coreGrab.grab;
|
||||||
register DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
|
|
||||||
mouse->valuator->motionHintWindow = NullWindow;
|
mouse->valuator->motionHintWindow = NullWindow;
|
||||||
mouse->coreGrab.grab = NullGrab;
|
mouse->coreGrab.grab = NullGrab;
|
||||||
|
@ -1372,7 +1372,7 @@ DeactivatePointerGrab(register DeviceIntPtr mouse)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
|
ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
|
||||||
{
|
{
|
||||||
WindowPtr oldWin;
|
WindowPtr oldWin;
|
||||||
|
|
||||||
|
@ -1398,11 +1398,11 @@ ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DeactivateKeyboardGrab(register DeviceIntPtr keybd)
|
DeactivateKeyboardGrab(DeviceIntPtr keybd)
|
||||||
{
|
{
|
||||||
register GrabPtr grab = keybd->coreGrab.grab;
|
GrabPtr grab = keybd->coreGrab.grab;
|
||||||
register DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
register WindowPtr focusWin = keybd->focus ? keybd->focus->win
|
WindowPtr focusWin = keybd->focus ? keybd->focus->win
|
||||||
: keybd->pSprite->win;
|
: keybd->pSprite->win;
|
||||||
|
|
||||||
if (focusWin == FollowKeyboardWin)
|
if (focusWin == FollowKeyboardWin)
|
||||||
|
@ -1434,7 +1434,7 @@ AllowSome(ClientPtr client,
|
||||||
{
|
{
|
||||||
Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced;
|
Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced;
|
||||||
TimeStamp grabTime;
|
TimeStamp grabTime;
|
||||||
register DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
GrabInfoPtr devgrabinfo,
|
GrabInfoPtr devgrabinfo,
|
||||||
grabinfo = (core) ? &thisDev->coreGrab : &thisDev->deviceGrab;
|
grabinfo = (core) ? &thisDev->coreGrab : &thisDev->deviceGrab;
|
||||||
|
|
||||||
|
@ -1551,7 +1551,7 @@ AllowSome(ClientPtr client,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcAllowEvents(register ClientPtr client)
|
ProcAllowEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
TimeStamp time;
|
TimeStamp time;
|
||||||
DeviceIntPtr mouse = PickPointer(client);
|
DeviceIntPtr mouse = PickPointer(client);
|
||||||
|
@ -1596,7 +1596,7 @@ ProcAllowEvents(register ClientPtr client)
|
||||||
void
|
void
|
||||||
ReleaseActiveGrabs(ClientPtr client)
|
ReleaseActiveGrabs(ClientPtr client)
|
||||||
{
|
{
|
||||||
register DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
Bool done;
|
Bool done;
|
||||||
|
|
||||||
/* XXX CloseDownClient should remove passive grabs before
|
/* XXX CloseDownClient should remove passive grabs before
|
||||||
|
@ -1704,12 +1704,12 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent
|
DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
|
||||||
*pEvents, int count, Mask filter, GrabPtr grab, int mskidx)
|
*pEvents, int count, Mask filter, GrabPtr grab, int mskidx)
|
||||||
{
|
{
|
||||||
int deliveries = 0, nondeliveries = 0;
|
int deliveries = 0, nondeliveries = 0;
|
||||||
int attempt;
|
int attempt;
|
||||||
register InputClients *other;
|
InputClients *other;
|
||||||
ClientPtr client = NullClient;
|
ClientPtr client = NullClient;
|
||||||
Mask deliveryMask = 0; /* If a grab occurs due to a button press, then
|
Mask deliveryMask = 0; /* If a grab occurs due to a button press, then
|
||||||
this mask is the mask of the grab. */
|
this mask is the mask of the grab. */
|
||||||
|
@ -1839,10 +1839,10 @@ XineramaTryClientEventsResult(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
MaybeDeliverEventsToClient(register WindowPtr pWin, xEvent *pEvents,
|
MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents,
|
||||||
int count, Mask filter, ClientPtr dontClient)
|
int count, Mask filter, ClientPtr dontClient)
|
||||||
{
|
{
|
||||||
register OtherClients *other;
|
OtherClients *other;
|
||||||
|
|
||||||
|
|
||||||
if (pWin->eventMask & filter)
|
if (pWin->eventMask & filter)
|
||||||
|
@ -1997,8 +1997,8 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab,
|
||||||
|
|
||||||
/* not useful for events that propagate up the tree or extension events */
|
/* not useful for events that propagate up the tree or extension events */
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
DeliverEvents(register WindowPtr pWin, register xEvent *xE, int count,
|
DeliverEvents(WindowPtr pWin, xEvent *xE, int count,
|
||||||
register WindowPtr otherParent)
|
WindowPtr otherParent)
|
||||||
{
|
{
|
||||||
Mask filter;
|
Mask filter;
|
||||||
int deliveries;
|
int deliveries;
|
||||||
|
@ -2065,7 +2065,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
|
||||||
static WindowPtr
|
static WindowPtr
|
||||||
XYToWindow(int x, int y)
|
XYToWindow(int x, int y)
|
||||||
{
|
{
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
spriteTraceGood = 1; /* root window still there */
|
spriteTraceGood = 1; /* root window still there */
|
||||||
|
@ -2255,7 +2255,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
DefineInitialRootWindow(register WindowPtr win)
|
DefineInitialRootWindow(WindowPtr win)
|
||||||
{
|
{
|
||||||
DeviceIntPtr pDev = inputInfo.devices;
|
DeviceIntPtr pDev = inputInfo.devices;
|
||||||
|
|
||||||
|
@ -2632,14 +2632,14 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin)
|
||||||
static Bool
|
static Bool
|
||||||
CheckPassiveGrabsOnWindow(
|
CheckPassiveGrabsOnWindow(
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
register DeviceIntPtr device,
|
DeviceIntPtr device,
|
||||||
register xEvent *xE,
|
xEvent *xE,
|
||||||
int count)
|
int count)
|
||||||
{
|
{
|
||||||
register GrabPtr grab = wPassiveGrabs(pWin);
|
GrabPtr grab = wPassiveGrabs(pWin);
|
||||||
GrabRec tempGrab;
|
GrabRec tempGrab;
|
||||||
GrabInfoPtr grabinfo;
|
GrabInfoPtr grabinfo;
|
||||||
register xEvent *dxE;
|
xEvent *dxE;
|
||||||
|
|
||||||
if (!grab)
|
if (!grab)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -2737,12 +2737,12 @@ tried. PRH
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
CheckDeviceGrabs(register DeviceIntPtr device, register xEvent *xE,
|
CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE,
|
||||||
int checkFirst, int count)
|
int checkFirst, int count)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register WindowPtr pWin = NULL;
|
WindowPtr pWin = NULL;
|
||||||
register FocusClassPtr focus = device->focus;
|
FocusClassPtr focus = device->focus;
|
||||||
|
|
||||||
if (((xE->u.u.type == ButtonPress)
|
if (((xE->u.u.type == ButtonPress)
|
||||||
#if defined(XINPUT) && defined(XKB)
|
#if defined(XINPUT) && defined(XKB)
|
||||||
|
@ -2809,14 +2809,14 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev,
|
DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev,
|
||||||
Bool deactivateGrab, int count)
|
Bool deactivateGrab, int count)
|
||||||
{
|
{
|
||||||
register GrabPtr grab;
|
GrabPtr grab;
|
||||||
GrabInfoPtr grabinfo;
|
GrabInfoPtr grabinfo;
|
||||||
int deliveries = 0;
|
int deliveries = 0;
|
||||||
register DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
register xEvent *dxE;
|
xEvent *dxE;
|
||||||
SpritePtr pSprite = thisDev->pSprite;
|
SpritePtr pSprite = thisDev->pSprite;
|
||||||
|
|
||||||
if (xE->u.u.type & EXTENSION_EVENT_BASE)
|
if (xE->u.u.type & EXTENSION_EVENT_BASE)
|
||||||
|
@ -2906,21 +2906,20 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev,
|
||||||
|
|
||||||
void
|
void
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
CoreProcessKeyboardEvent (register xEvent *xE, register DeviceIntPtr keybd, int count)
|
CoreProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count)
|
||||||
#else
|
#else
|
||||||
ProcessKeyboardEvent (register xEvent *xE, register DeviceIntPtr keybd, int count)
|
ProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int key, bit;
|
int key, bit;
|
||||||
register BYTE *kptr;
|
BYTE *kptr;
|
||||||
register int i;
|
int i;
|
||||||
register CARD8 modifiers;
|
CARD8 modifiers;
|
||||||
register CARD16 mask;
|
CARD16 mask;
|
||||||
register GrabPtr grab;
|
GrabPtr grab;
|
||||||
GrabInfoPtr grabinfo;
|
GrabInfoPtr grabinfo;
|
||||||
Bool deactivateGrab = FALSE;
|
Bool deactivateGrab = FALSE;
|
||||||
register KeyClassPtr keyc = keybd->key;
|
KeyClassPtr keyc = keybd->key;
|
||||||
|
|
||||||
#ifdef XEVIE
|
#ifdef XEVIE
|
||||||
static Window rootWin = 0;
|
static Window rootWin = 0;
|
||||||
|
|
||||||
|
@ -3079,11 +3078,11 @@ drawable.id:0;
|
||||||
CoreProcessKeyEvent to be called, as in for example Mouse Keys.
|
CoreProcessKeyEvent to be called, as in for example Mouse Keys.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
FixKeyState (register xEvent *xE, register DeviceIntPtr keybd)
|
FixKeyState (xEvent *xE, DeviceIntPtr keybd)
|
||||||
{
|
{
|
||||||
int key, bit;
|
int key, bit;
|
||||||
register BYTE *kptr;
|
BYTE *kptr;
|
||||||
register KeyClassPtr keyc = keybd->key;
|
KeyClassPtr keyc = keybd->key;
|
||||||
|
|
||||||
key = xE->u.u.detail;
|
key = xE->u.u.detail;
|
||||||
kptr = &keyc->down[key >> 3];
|
kptr = &keyc->down[key >> 3];
|
||||||
|
@ -3110,14 +3109,14 @@ FixKeyState (register xEvent *xE, register DeviceIntPtr keybd)
|
||||||
|
|
||||||
void
|
void
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
CoreProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count)
|
CoreProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
|
||||||
#else
|
#else
|
||||||
ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count)
|
ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
GrabPtr grab = mouse->coreGrab.grab;
|
GrabPtr grab = mouse->coreGrab.grab;
|
||||||
Bool deactivateGrab = FALSE;
|
Bool deactivateGrab = FALSE;
|
||||||
register ButtonClassPtr butc = mouse->button;
|
ButtonClassPtr butc = mouse->button;
|
||||||
SpritePtr pSprite = mouse->pSprite;
|
SpritePtr pSprite = mouse->pSprite;
|
||||||
|
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
|
@ -3163,8 +3162,8 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count
|
||||||
}
|
}
|
||||||
if (xE->u.u.type != MotionNotify)
|
if (xE->u.u.type != MotionNotify)
|
||||||
{
|
{
|
||||||
register int key;
|
int key;
|
||||||
register BYTE *kptr;
|
BYTE *kptr;
|
||||||
int bit;
|
int bit;
|
||||||
|
|
||||||
XE_KBPTR.rootX = pSprite->hot.x;
|
XE_KBPTR.rootX = pSprite->hot.x;
|
||||||
|
@ -3225,10 +3224,10 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count
|
||||||
|
|
||||||
void
|
void
|
||||||
RecalculateDeliverableEvents(pWin)
|
RecalculateDeliverableEvents(pWin)
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
{
|
{
|
||||||
register OtherClients *others;
|
OtherClients *others;
|
||||||
register WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
|
|
||||||
pChild = pWin;
|
pChild = pWin;
|
||||||
while (1)
|
while (1)
|
||||||
|
@ -3267,8 +3266,8 @@ RecalculateDeliverableEvents(pWin)
|
||||||
int
|
int
|
||||||
OtherClientGone(pointer value, XID id)
|
OtherClientGone(pointer value, XID id)
|
||||||
{
|
{
|
||||||
register OtherClientsPtr other, prev;
|
OtherClientsPtr other, prev;
|
||||||
register WindowPtr pWin = (WindowPtr)value;
|
WindowPtr pWin = (WindowPtr)value;
|
||||||
|
|
||||||
prev = 0;
|
prev = 0;
|
||||||
for (other = wOtherClients(pWin); other; other = other->next)
|
for (other = wOtherClients(pWin); other; other = other->next)
|
||||||
|
@ -3294,7 +3293,7 @@ OtherClientGone(pointer value, XID id)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
EventSelectForWindow(register WindowPtr pWin, register ClientPtr client, Mask mask)
|
EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask)
|
||||||
{
|
{
|
||||||
Mask check;
|
Mask check;
|
||||||
OtherClients * others;
|
OtherClients * others;
|
||||||
|
@ -3366,10 +3365,10 @@ maskSet:
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
EventSuppressForWindow(register WindowPtr pWin, register ClientPtr client,
|
EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
|
||||||
Mask mask, Bool *checkOptional)
|
Mask mask, Bool *checkOptional)
|
||||||
{
|
{
|
||||||
register int i, free;
|
int i, free;
|
||||||
|
|
||||||
if (mask & ~PropagateMask)
|
if (mask & ~PropagateMask)
|
||||||
{
|
{
|
||||||
|
@ -3423,8 +3422,8 @@ EventSuppressForWindow(register WindowPtr pWin, register ClientPtr client,
|
||||||
|
|
||||||
static WindowPtr
|
static WindowPtr
|
||||||
CommonAncestor(
|
CommonAncestor(
|
||||||
register WindowPtr a,
|
WindowPtr a,
|
||||||
register WindowPtr b)
|
WindowPtr b)
|
||||||
{
|
{
|
||||||
for (b = b->parent; b; b = b->parent)
|
for (b = b->parent; b; b = b->parent)
|
||||||
if (IsParent(b, a)) return b;
|
if (IsParent(b, a)) return b;
|
||||||
|
@ -3437,13 +3436,13 @@ EnterLeaveEvent(
|
||||||
int type,
|
int type,
|
||||||
int mode,
|
int mode,
|
||||||
int detail,
|
int detail,
|
||||||
register WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
Window child)
|
Window child)
|
||||||
{
|
{
|
||||||
xEvent event;
|
xEvent event;
|
||||||
register DeviceIntPtr keybd = inputInfo.keyboard;
|
DeviceIntPtr keybd = inputInfo.keyboard;
|
||||||
WindowPtr focus;
|
WindowPtr focus;
|
||||||
register DeviceIntPtr mouse = pDev;
|
DeviceIntPtr mouse = pDev;
|
||||||
GrabPtr grab = mouse->coreGrab.grab;
|
GrabPtr grab = mouse->coreGrab.grab;
|
||||||
GrabPtr devgrab = mouse->deviceGrab.grab;
|
GrabPtr devgrab = mouse->deviceGrab.grab;
|
||||||
Mask mask;
|
Mask mask;
|
||||||
|
@ -3564,7 +3563,7 @@ LeaveNotifies(DeviceIntPtr pDev,
|
||||||
int mode,
|
int mode,
|
||||||
int detail)
|
int detail)
|
||||||
{
|
{
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
if (ancestor == child)
|
if (ancestor == child)
|
||||||
return;
|
return;
|
||||||
|
@ -3613,7 +3612,7 @@ DoEnterLeaveEvents(DeviceIntPtr pDev,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr pWin)
|
FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin)
|
||||||
{
|
{
|
||||||
xEvent event;
|
xEvent event;
|
||||||
|
|
||||||
|
@ -3683,7 +3682,7 @@ FocusOutEvents(
|
||||||
int mode, int detail,
|
int mode, int detail,
|
||||||
Bool doAncestor)
|
Bool doAncestor)
|
||||||
{
|
{
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
for (pWin = child; pWin != ancestor; pWin = pWin->parent)
|
for (pWin = child; pWin != ancestor; pWin = pWin->parent)
|
||||||
FocusEvent(dev, FocusOut, mode, detail, pWin);
|
FocusEvent(dev, FocusOut, mode, detail, pWin);
|
||||||
|
@ -3827,7 +3826,7 @@ SetInputFocus(
|
||||||
Time ctime,
|
Time ctime,
|
||||||
Bool followOK)
|
Bool followOK)
|
||||||
{
|
{
|
||||||
register FocusClassPtr focus;
|
FocusClassPtr focus;
|
||||||
WindowPtr focusWin;
|
WindowPtr focusWin;
|
||||||
int mode, rc;
|
int mode, rc;
|
||||||
TimeStamp time;
|
TimeStamp time;
|
||||||
|
@ -3875,7 +3874,7 @@ SetInputFocus(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int depth = 0;
|
int depth = 0;
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
for (pWin = focusWin; pWin; pWin = pWin->parent) depth++;
|
for (pWin = focusWin; pWin; pWin = pWin->parent) depth++;
|
||||||
if (depth > focus->traceSize)
|
if (depth > focus->traceSize)
|
||||||
|
@ -4045,7 +4044,7 @@ int
|
||||||
ProcChangeActivePointerGrab(ClientPtr client)
|
ProcChangeActivePointerGrab(ClientPtr client)
|
||||||
{
|
{
|
||||||
DeviceIntPtr device = PickPointer(client);
|
DeviceIntPtr device = PickPointer(client);
|
||||||
register GrabPtr grab = device->coreGrab.grab;
|
GrabPtr grab = device->coreGrab.grab;
|
||||||
CursorPtr newCursor, oldCursor;
|
CursorPtr newCursor, oldCursor;
|
||||||
REQUEST(xChangeActivePointerGrabReq);
|
REQUEST(xChangeActivePointerGrabReq);
|
||||||
TimeStamp time;
|
TimeStamp time;
|
||||||
|
@ -4107,12 +4106,12 @@ ProcUngrabPointer(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GrabDevice(register ClientPtr client, register DeviceIntPtr dev,
|
GrabDevice(ClientPtr client, DeviceIntPtr dev,
|
||||||
unsigned this_mode, unsigned other_mode, Window grabWindow,
|
unsigned this_mode, unsigned other_mode, Window grabWindow,
|
||||||
unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status)
|
unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
register GrabPtr grab;
|
GrabPtr grab;
|
||||||
TimeStamp time;
|
TimeStamp time;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@ -4746,7 +4745,7 @@ CheckCursorConfinement(WindowPtr pWin)
|
||||||
Mask
|
Mask
|
||||||
EventMaskForClient(WindowPtr pWin, ClientPtr client)
|
EventMaskForClient(WindowPtr pWin, ClientPtr client)
|
||||||
{
|
{
|
||||||
register OtherClientsPtr other;
|
OtherClientsPtr other;
|
||||||
|
|
||||||
if (wClient (pWin) == client)
|
if (wClient (pWin) == client)
|
||||||
return pWin->eventMask;
|
return pWin->eventMask;
|
||||||
|
|
|
@ -81,11 +81,11 @@ extern unsigned totalExtensionSize;
|
||||||
static void
|
static void
|
||||||
InitExtensionPrivates(ExtensionEntry *ext)
|
InitExtensionPrivates(ExtensionEntry *ext)
|
||||||
{
|
{
|
||||||
register char *ptr;
|
char *ptr;
|
||||||
DevUnion *ppriv;
|
DevUnion *ppriv;
|
||||||
register unsigned *sizes;
|
unsigned *sizes;
|
||||||
register unsigned size;
|
unsigned size;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
if (totalExtensionSize == sizeof(ExtensionEntry))
|
if (totalExtensionSize == sizeof(ExtensionEntry))
|
||||||
ppriv = (DevUnion *)NULL;
|
ppriv = (DevUnion *)NULL;
|
||||||
|
@ -115,7 +115,7 @@ AddExtension(char *name, int NumEvents, int NumErrors,
|
||||||
unsigned short (*MinorOpcodeProc)(ClientPtr c3))
|
unsigned short (*MinorOpcodeProc)(ClientPtr c3))
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
register ExtensionEntry *ext, **newexts;
|
ExtensionEntry *ext, **newexts;
|
||||||
|
|
||||||
if (!MainProc || !SwappedMainProc || !CloseDownProc || !MinorOpcodeProc)
|
if (!MainProc || !SwappedMainProc || !CloseDownProc || !MinorOpcodeProc)
|
||||||
return((ExtensionEntry *) NULL);
|
return((ExtensionEntry *) NULL);
|
||||||
|
@ -282,7 +282,7 @@ MinorOpcodeOfRequest(ClientPtr client)
|
||||||
void
|
void
|
||||||
CloseDownExtensions()
|
CloseDownExtensions()
|
||||||
{
|
{
|
||||||
register int i,j;
|
int i,j;
|
||||||
|
|
||||||
for (i = NumExtensions - 1; i >= 0; i--)
|
for (i = NumExtensions - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
|
@ -300,7 +300,7 @@ CloseDownExtensions()
|
||||||
lastError = FirstExtensionError;
|
lastError = FirstExtensionError;
|
||||||
for (i=0; i<MAXSCREENS; i++)
|
for (i=0; i<MAXSCREENS; i++)
|
||||||
{
|
{
|
||||||
register ScreenProcEntry *spentry = &AuxillaryScreenProcs[i];
|
ScreenProcEntry *spentry = &AuxillaryScreenProcs[i];
|
||||||
|
|
||||||
while (spentry->num)
|
while (spentry->num)
|
||||||
{
|
{
|
||||||
|
@ -363,7 +363,7 @@ ProcListExtensions(ClientPtr client)
|
||||||
|
|
||||||
if ( NumExtensions )
|
if ( NumExtensions )
|
||||||
{
|
{
|
||||||
register int i, j;
|
int i, j;
|
||||||
|
|
||||||
for (i=0; i<NumExtensions; i++)
|
for (i=0; i<NumExtensions; i++)
|
||||||
{
|
{
|
||||||
|
@ -410,8 +410,8 @@ ProcListExtensions(ClientPtr client)
|
||||||
ExtensionLookupProc
|
ExtensionLookupProc
|
||||||
LookupProc(char *name, GCPtr pGC)
|
LookupProc(char *name, GCPtr pGC)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register ScreenProcEntry *spentry;
|
ScreenProcEntry *spentry;
|
||||||
spentry = &AuxillaryScreenProcs[pGC->pScreen->myNum];
|
spentry = &AuxillaryScreenProcs[pGC->pScreen->myNum];
|
||||||
if (spentry->num)
|
if (spentry->num)
|
||||||
{
|
{
|
||||||
|
@ -431,8 +431,8 @@ RegisterProc(char *name, GC *pGC, ExtensionLookupProc proc)
|
||||||
Bool
|
Bool
|
||||||
RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc)
|
RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc)
|
||||||
{
|
{
|
||||||
register ScreenProcEntry *spentry;
|
ScreenProcEntry *spentry;
|
||||||
register ProcEntryPtr procEntry = (ProcEntryPtr)NULL;
|
ProcEntryPtr procEntry = (ProcEntryPtr)NULL;
|
||||||
char *newname;
|
char *newname;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
60
dix/gc.c
60
dix/gc.c
|
@ -144,10 +144,10 @@ ValidateGC(DrawablePtr pDraw, GC *pGC)
|
||||||
assert(pUnion); _var = (_type)pUnion->ptr; pUnion++; }
|
assert(pUnion); _var = (_type)pUnion->ptr; pUnion++; }
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion)
|
dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion)
|
||||||
{
|
{
|
||||||
register BITS32 index2;
|
BITS32 index2;
|
||||||
register int error = 0;
|
int error = 0;
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
BITS32 maskQ;
|
BITS32 maskQ;
|
||||||
|
|
||||||
|
@ -522,7 +522,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC
|
||||||
/* Publically defined entry to ChangeGC. Just calls dixChangeGC and tells
|
/* Publically defined entry to ChangeGC. Just calls dixChangeGC and tells
|
||||||
* it that all of the entries are constants or IDs */
|
* it that all of the entries are constants or IDs */
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
ChangeGC(register GC *pGC, register BITS32 mask, XID *pval)
|
ChangeGC(GC *pGC, BITS32 mask, XID *pval)
|
||||||
{
|
{
|
||||||
return (dixChangeGC(NullClient, pGC, mask, pval, NULL));
|
return (dixChangeGC(NullClient, pGC, mask, pval, NULL));
|
||||||
}
|
}
|
||||||
|
@ -548,7 +548,7 @@ NOTE:
|
||||||
32 bits long
|
32 bits long
|
||||||
*/
|
*/
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
DoChangeGC(register GC *pGC, register BITS32 mask, XID *pval, int fPointer)
|
DoChangeGC(GC *pGC, BITS32 mask, XID *pval, int fPointer)
|
||||||
{
|
{
|
||||||
if (fPointer)
|
if (fPointer)
|
||||||
/* XXX might be a problem on 64 bit big-endian servers */
|
/* XXX might be a problem on 64 bit big-endian servers */
|
||||||
|
@ -572,11 +572,11 @@ static GCPtr
|
||||||
AllocateGC(ScreenPtr pScreen)
|
AllocateGC(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
register char *ptr;
|
char *ptr;
|
||||||
register DevUnion *ppriv;
|
DevUnion *ppriv;
|
||||||
register unsigned *sizes;
|
unsigned *sizes;
|
||||||
register unsigned size;
|
unsigned size;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
pGC = (GCPtr)xalloc(pScreen->totalGCSize);
|
pGC = (GCPtr)xalloc(pScreen->totalGCSize);
|
||||||
if (pGC)
|
if (pGC)
|
||||||
|
@ -602,7 +602,7 @@ AllocateGC(ScreenPtr pScreen)
|
||||||
_X_EXPORT GCPtr
|
_X_EXPORT GCPtr
|
||||||
CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus)
|
CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus)
|
||||||
{
|
{
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
pGC = AllocateGC(pDrawable->pScreen);
|
pGC = AllocateGC(pDrawable->pScreen);
|
||||||
if (!pGC)
|
if (!pGC)
|
||||||
|
@ -724,9 +724,9 @@ CreateDefaultTile (GCPtr pGC)
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
CopyGC(register GC *pgcSrc, register GC *pgcDst, register BITS32 mask)
|
CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask)
|
||||||
{
|
{
|
||||||
register BITS32 index2;
|
BITS32 index2;
|
||||||
BITS32 maskQ;
|
BITS32 maskQ;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
|
@ -934,7 +934,7 @@ go with CreateGC() or ChangeGC().)
|
||||||
_X_EXPORT GCPtr
|
_X_EXPORT GCPtr
|
||||||
CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
||||||
{
|
{
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
pGC = AllocateGC(pScreen);
|
pGC = AllocateGC(pScreen);
|
||||||
if (!pGC)
|
if (!pGC)
|
||||||
|
@ -986,8 +986,8 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
||||||
void
|
void
|
||||||
FreeGCperDepth(int screenNum)
|
FreeGCperDepth(int screenNum)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
GCPtr *ppGC;
|
GCPtr *ppGC;
|
||||||
|
|
||||||
pScreen = screenInfo.screens[screenNum];
|
pScreen = screenInfo.screens[screenNum];
|
||||||
|
@ -1002,8 +1002,8 @@ FreeGCperDepth(int screenNum)
|
||||||
Bool
|
Bool
|
||||||
CreateGCperDepth(int screenNum)
|
CreateGCperDepth(int screenNum)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
DepthPtr pDepth;
|
DepthPtr pDepth;
|
||||||
GCPtr *ppGC;
|
GCPtr *ppGC;
|
||||||
|
|
||||||
|
@ -1035,7 +1035,7 @@ CreateGCperDepth(int screenNum)
|
||||||
Bool
|
Bool
|
||||||
CreateDefaultStipple(int screenNum)
|
CreateDefaultStipple(int screenNum)
|
||||||
{
|
{
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
XID tmpval[3];
|
XID tmpval[3];
|
||||||
xRectangle rect;
|
xRectangle rect;
|
||||||
CARD16 w, h;
|
CARD16 w, h;
|
||||||
|
@ -1077,10 +1077,10 @@ FreeDefaultStipple(int screenNum)
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
SetDashes(register GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash)
|
SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash)
|
||||||
{
|
{
|
||||||
register long i;
|
long i;
|
||||||
register unsigned char *p, *indash;
|
unsigned char *p, *indash;
|
||||||
BITS32 maskQ = 0;
|
BITS32 maskQ = 0;
|
||||||
|
|
||||||
i = ndash;
|
i = ndash;
|
||||||
|
@ -1135,8 +1135,8 @@ SetDashes(register GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pd
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
VerifyRectOrder(int nrects, xRectangle *prects, int ordering)
|
VerifyRectOrder(int nrects, xRectangle *prects, int ordering)
|
||||||
{
|
{
|
||||||
register xRectangle *prectP, *prectN;
|
xRectangle *prectP, *prectN;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
switch(ordering)
|
switch(ordering)
|
||||||
{
|
{
|
||||||
|
@ -1220,10 +1220,10 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
|
||||||
you use it often enough it will become real.)
|
you use it often enough it will become real.)
|
||||||
*/
|
*/
|
||||||
_X_EXPORT GCPtr
|
_X_EXPORT GCPtr
|
||||||
GetScratchGC(register unsigned depth, register ScreenPtr pScreen)
|
GetScratchGC(unsigned depth, ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
for (i=0; i<=pScreen->numDepths; i++)
|
for (i=0; i<=pScreen->numDepths; i++)
|
||||||
if ( pScreen->GCperDepth[i]->depth == depth &&
|
if ( pScreen->GCperDepth[i]->depth == depth &&
|
||||||
|
@ -1269,10 +1269,10 @@ mark it as available.
|
||||||
if not, free it for real
|
if not, free it for real
|
||||||
*/
|
*/
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
FreeScratchGC(register GCPtr pGC)
|
FreeScratchGC(GCPtr pGC)
|
||||||
{
|
{
|
||||||
register ScreenPtr pScreen = pGC->pScreen;
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
for (i=0; i<=pScreen->numDepths; i++)
|
for (i=0; i<=pScreen->numDepths; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,10 +74,10 @@ cursor metrics.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, unsigned char **ppbits)
|
ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned char **ppbits)
|
||||||
{
|
{
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
xRectangle rect;
|
xRectangle rect;
|
||||||
PixmapPtr ppix;
|
PixmapPtr ppix;
|
||||||
long nby;
|
long nby;
|
||||||
|
@ -140,7 +140,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
|
||||||
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
CursorMetricsFromGlyph(register FontPtr pfont, unsigned ch, register CursorMetricPtr cm)
|
CursorMetricsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm)
|
||||||
{
|
{
|
||||||
CharInfoPtr pci;
|
CharInfoPtr pci;
|
||||||
unsigned long nglyphs;
|
unsigned long nglyphs;
|
||||||
|
|
|
@ -128,7 +128,7 @@ FreeGrab(GrabPtr pGrab)
|
||||||
int
|
int
|
||||||
DeletePassiveGrab(pointer value, XID id)
|
DeletePassiveGrab(pointer value, XID id)
|
||||||
{
|
{
|
||||||
register GrabPtr g, prev;
|
GrabPtr g, prev;
|
||||||
GrabPtr pGrab = (GrabPtr)value;
|
GrabPtr pGrab = (GrabPtr)value;
|
||||||
|
|
||||||
/* it is OK if the grab isn't found */
|
/* it is OK if the grab isn't found */
|
||||||
|
@ -153,8 +153,8 @@ DeletePassiveGrab(pointer value, XID id)
|
||||||
static Mask *
|
static Mask *
|
||||||
DeleteDetailFromMask(Mask *pDetailMask, unsigned short detail)
|
DeleteDetailFromMask(Mask *pDetailMask, unsigned short detail)
|
||||||
{
|
{
|
||||||
register Mask *mask;
|
Mask *mask;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
mask = (Mask *)xalloc(sizeof(Mask) * MasksPerDetailMask);
|
mask = (Mask *)xalloc(sizeof(Mask) * MasksPerDetailMask);
|
||||||
if (mask)
|
if (mask)
|
||||||
|
@ -305,7 +305,7 @@ AddPassiveGrabToList(GrabPtr pGrab)
|
||||||
Bool
|
Bool
|
||||||
DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
|
DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
|
||||||
{
|
{
|
||||||
register GrabPtr grab;
|
GrabPtr grab;
|
||||||
GrabPtr *deletes, *adds;
|
GrabPtr *deletes, *adds;
|
||||||
Mask ***updates, **details;
|
Mask ***updates, **details;
|
||||||
int i, ndels, nadds, nups;
|
int i, ndels, nadds, nups;
|
||||||
|
|
|
@ -361,9 +361,7 @@ main(int argc, char *argv[], char *envp[])
|
||||||
ResetScreenPrivates();
|
ResetScreenPrivates();
|
||||||
ResetWindowPrivates();
|
ResetWindowPrivates();
|
||||||
ResetGCPrivates();
|
ResetGCPrivates();
|
||||||
#ifdef PIXPRIV
|
|
||||||
ResetPixmapPrivates();
|
ResetPixmapPrivates();
|
||||||
#endif
|
|
||||||
ResetColormapPrivates();
|
ResetColormapPrivates();
|
||||||
ResetFontPrivateIndex();
|
ResetFontPrivateIndex();
|
||||||
ResetDevicePrivateIndex();
|
ResetDevicePrivateIndex();
|
||||||
|
@ -731,11 +729,9 @@ AddScreen(
|
||||||
pScreen->GCPrivateSizes = (unsigned *)NULL;
|
pScreen->GCPrivateSizes = (unsigned *)NULL;
|
||||||
pScreen->totalGCSize =
|
pScreen->totalGCSize =
|
||||||
((sizeof(GC) + sizeof(long) - 1) / sizeof(long)) * sizeof(long);
|
((sizeof(GC) + sizeof(long) - 1) / sizeof(long)) * sizeof(long);
|
||||||
#ifdef PIXPRIV
|
|
||||||
pScreen->PixmapPrivateLen = 0;
|
pScreen->PixmapPrivateLen = 0;
|
||||||
pScreen->PixmapPrivateSizes = (unsigned *)NULL;
|
pScreen->PixmapPrivateSizes = (unsigned *)NULL;
|
||||||
pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8);
|
pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8);
|
||||||
#endif
|
|
||||||
pScreen->ClipNotify = 0; /* for R4 ddx compatibility */
|
pScreen->ClipNotify = 0; /* for R4 ddx compatibility */
|
||||||
pScreen->CreateScreenResources = 0;
|
pScreen->CreateScreenResources = 0;
|
||||||
|
|
||||||
|
@ -799,9 +795,7 @@ FreeScreen(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
xfree(pScreen->WindowPrivateSizes);
|
xfree(pScreen->WindowPrivateSizes);
|
||||||
xfree(pScreen->GCPrivateSizes);
|
xfree(pScreen->GCPrivateSizes);
|
||||||
#ifdef PIXPRIV
|
|
||||||
xfree(pScreen->PixmapPrivateSizes);
|
xfree(pScreen->PixmapPrivateSizes);
|
||||||
#endif
|
|
||||||
xfree(pScreen->devPrivates);
|
xfree(pScreen->devPrivates);
|
||||||
xfree(pScreen);
|
xfree(pScreen);
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,6 @@ _X_EXPORT PixmapPtr
|
||||||
AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
|
AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
|
||||||
{
|
{
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
#ifdef PIXPRIV
|
|
||||||
char *ptr;
|
char *ptr;
|
||||||
DevUnion *ppriv;
|
DevUnion *ppriv;
|
||||||
unsigned *sizes;
|
unsigned *sizes;
|
||||||
|
@ -136,9 +135,6 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
|
||||||
else
|
else
|
||||||
ppriv->ptr = (pointer)NULL;
|
ppriv->ptr = (pointer)NULL;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
pPixmap = (PixmapPtr)xalloc(sizeof(PixmapRec) + pixDataSize);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _XSERVER64
|
#ifdef _XSERVER64
|
||||||
if (pPixmap) {
|
if (pPixmap) {
|
||||||
|
|
|
@ -225,7 +225,7 @@ AllocateWindowPrivateIndex()
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
AllocateWindowPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
AllocateWindowPrivate(ScreenPtr pScreen, int index2, unsigned amount)
|
||||||
{
|
{
|
||||||
unsigned oldamount;
|
unsigned oldamount;
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ AllocateGCPrivateIndex()
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
AllocateGCPrivate(ScreenPtr pScreen, int index2, unsigned amount)
|
||||||
{
|
{
|
||||||
unsigned oldamount;
|
unsigned oldamount;
|
||||||
|
|
||||||
|
@ -309,7 +309,6 @@ AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
||||||
/*
|
/*
|
||||||
* pixmap private machinery
|
* pixmap private machinery
|
||||||
*/
|
*/
|
||||||
#ifdef PIXPRIV
|
|
||||||
static int pixmapPrivateCount;
|
static int pixmapPrivateCount;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -325,7 +324,7 @@ AllocatePixmapPrivateIndex()
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
AllocatePixmapPrivate(ScreenPtr pScreen, int index2, unsigned amount)
|
||||||
{
|
{
|
||||||
unsigned oldamount;
|
unsigned oldamount;
|
||||||
|
|
||||||
|
@ -355,7 +354,6 @@ AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
||||||
pScreen->totalPixmapSize = BitmapBytePad(pScreen->totalPixmapSize * 8);
|
pScreen->totalPixmapSize = BitmapBytePad(pScreen->totalPixmapSize * 8);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -76,7 +76,7 @@ static void
|
||||||
PrintPropertys(WindowPtr pWin)
|
PrintPropertys(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
PropertyPtr pProp;
|
PropertyPtr pProp;
|
||||||
register int j;
|
int j;
|
||||||
|
|
||||||
pProp = pWin->userProps;
|
pProp = pWin->userProps;
|
||||||
while (pProp)
|
while (pProp)
|
||||||
|
@ -97,7 +97,7 @@ ProcRotateProperties(ClientPtr client)
|
||||||
int i, j, delta, rc;
|
int i, j, delta, rc;
|
||||||
REQUEST(xRotatePropertiesReq);
|
REQUEST(xRotatePropertiesReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
register Atom * atoms;
|
Atom * atoms;
|
||||||
PropertyPtr * props; /* array of pointer */
|
PropertyPtr * props; /* array of pointer */
|
||||||
PropertyPtr pProp;
|
PropertyPtr pProp;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
|
@ -622,7 +622,7 @@ ProcListProperties(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcDeleteProperty(register ClientPtr client)
|
ProcDeleteProperty(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
REQUEST(xDeletePropertyReq);
|
REQUEST(xDeletePropertyReq);
|
||||||
|
|
|
@ -257,7 +257,7 @@ ClientResourceRec clientTable[MAXCLIENTS];
|
||||||
Bool
|
Bool
|
||||||
InitClientResources(ClientPtr client)
|
InitClientResources(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int i, j;
|
int i, j;
|
||||||
|
|
||||||
if (client == serverClient)
|
if (client == serverClient)
|
||||||
{
|
{
|
||||||
|
@ -314,7 +314,7 @@ InitClientResources(ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
Hash(int client, register XID id)
|
Hash(int client, XID id)
|
||||||
{
|
{
|
||||||
id &= RESOURCE_ID_MASK;
|
id &= RESOURCE_ID_MASK;
|
||||||
switch (clientTable[client].hashsize)
|
switch (clientTable[client].hashsize)
|
||||||
|
@ -337,12 +337,12 @@ Hash(int client, register XID id)
|
||||||
|
|
||||||
static XID
|
static XID
|
||||||
AvailableID(
|
AvailableID(
|
||||||
register int client,
|
int client,
|
||||||
register XID id,
|
XID id,
|
||||||
register XID maxid,
|
XID maxid,
|
||||||
register XID goodid)
|
XID goodid)
|
||||||
{
|
{
|
||||||
register ResourcePtr res;
|
ResourcePtr res;
|
||||||
|
|
||||||
if ((goodid >= id) && (goodid <= maxid))
|
if ((goodid >= id) && (goodid <= maxid))
|
||||||
return goodid;
|
return goodid;
|
||||||
|
@ -360,10 +360,10 @@ AvailableID(
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
GetXIDRange(int client, Bool server, XID *minp, XID *maxp)
|
GetXIDRange(int client, Bool server, XID *minp, XID *maxp)
|
||||||
{
|
{
|
||||||
register XID id, maxid;
|
XID id, maxid;
|
||||||
register ResourcePtr *resp;
|
ResourcePtr *resp;
|
||||||
register ResourcePtr res;
|
ResourcePtr res;
|
||||||
register int i;
|
int i;
|
||||||
XID goodid;
|
XID goodid;
|
||||||
|
|
||||||
id = (Mask)client << CLIENTOFFSET;
|
id = (Mask)client << CLIENTOFFSET;
|
||||||
|
@ -436,7 +436,7 @@ GetXIDList(ClientPtr pClient, unsigned count, XID *pids)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_X_EXPORT XID
|
_X_EXPORT XID
|
||||||
FakeClientID(register int client)
|
FakeClientID(int client)
|
||||||
{
|
{
|
||||||
XID id, maxid;
|
XID id, maxid;
|
||||||
|
|
||||||
|
@ -460,8 +460,8 @@ _X_EXPORT Bool
|
||||||
AddResource(XID id, RESTYPE type, pointer value)
|
AddResource(XID id, RESTYPE type, pointer value)
|
||||||
{
|
{
|
||||||
int client;
|
int client;
|
||||||
register ClientResourceRec *rrec;
|
ClientResourceRec *rrec;
|
||||||
register ResourcePtr res, *head;
|
ResourcePtr res, *head;
|
||||||
|
|
||||||
#ifdef XSERVER_DTRACE
|
#ifdef XSERVER_DTRACE
|
||||||
XSERVER_RESOURCE_ALLOC(id, type, value, TypeNameString(type));
|
XSERVER_RESOURCE_ALLOC(id, type, value, TypeNameString(type));
|
||||||
|
@ -498,10 +498,10 @@ AddResource(XID id, RESTYPE type, pointer value)
|
||||||
static void
|
static void
|
||||||
RebuildTable(int client)
|
RebuildTable(int client)
|
||||||
{
|
{
|
||||||
register int j;
|
int j;
|
||||||
register ResourcePtr res, next;
|
ResourcePtr res, next;
|
||||||
ResourcePtr **tails, *resources;
|
ResourcePtr **tails, *resources;
|
||||||
register ResourcePtr **tptr, *rptr;
|
ResourcePtr **tptr, *rptr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For now, preserve insertion order, since some ddx layers depend
|
* For now, preserve insertion order, since some ddx layers depend
|
||||||
|
@ -548,9 +548,9 @@ _X_EXPORT void
|
||||||
FreeResource(XID id, RESTYPE skipDeleteFuncType)
|
FreeResource(XID id, RESTYPE skipDeleteFuncType)
|
||||||
{
|
{
|
||||||
int cid;
|
int cid;
|
||||||
register ResourcePtr res;
|
ResourcePtr res;
|
||||||
register ResourcePtr *prev, *head;
|
ResourcePtr *prev, *head;
|
||||||
register int *eltptr;
|
int *eltptr;
|
||||||
int elements;
|
int elements;
|
||||||
Bool gotOne = FALSE;
|
Bool gotOne = FALSE;
|
||||||
|
|
||||||
|
@ -600,8 +600,8 @@ _X_EXPORT void
|
||||||
FreeResourceByType(XID id, RESTYPE type, Bool skipFree)
|
FreeResourceByType(XID id, RESTYPE type, Bool skipFree)
|
||||||
{
|
{
|
||||||
int cid;
|
int cid;
|
||||||
register ResourcePtr res;
|
ResourcePtr res;
|
||||||
register ResourcePtr *prev, *head;
|
ResourcePtr *prev, *head;
|
||||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets)
|
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets)
|
||||||
{
|
{
|
||||||
head = &clientTable[cid].resources[Hash(cid, id)];
|
head = &clientTable[cid].resources[Hash(cid, id)];
|
||||||
|
@ -644,7 +644,7 @@ _X_EXPORT Bool
|
||||||
ChangeResourceValue (XID id, RESTYPE rtype, pointer value)
|
ChangeResourceValue (XID id, RESTYPE rtype, pointer value)
|
||||||
{
|
{
|
||||||
int cid;
|
int cid;
|
||||||
register ResourcePtr res;
|
ResourcePtr res;
|
||||||
|
|
||||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets)
|
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets)
|
||||||
{
|
{
|
||||||
|
@ -675,10 +675,10 @@ FindClientResourcesByType(
|
||||||
FindResType func,
|
FindResType func,
|
||||||
pointer cdata
|
pointer cdata
|
||||||
){
|
){
|
||||||
register ResourcePtr *resources;
|
ResourcePtr *resources;
|
||||||
register ResourcePtr this, next;
|
ResourcePtr this, next;
|
||||||
int i, elements;
|
int i, elements;
|
||||||
register int *eltptr;
|
int *eltptr;
|
||||||
|
|
||||||
if (!client)
|
if (!client)
|
||||||
client = serverClient;
|
client = serverClient;
|
||||||
|
@ -706,10 +706,10 @@ FindAllClientResources(
|
||||||
FindAllRes func,
|
FindAllRes func,
|
||||||
pointer cdata
|
pointer cdata
|
||||||
){
|
){
|
||||||
register ResourcePtr *resources;
|
ResourcePtr *resources;
|
||||||
register ResourcePtr this, next;
|
ResourcePtr this, next;
|
||||||
int i, elements;
|
int i, elements;
|
||||||
register int *eltptr;
|
int *eltptr;
|
||||||
|
|
||||||
if (!client)
|
if (!client)
|
||||||
client = serverClient;
|
client = serverClient;
|
||||||
|
@ -796,8 +796,8 @@ FreeClientNeverRetainResources(ClientPtr client)
|
||||||
void
|
void
|
||||||
FreeClientResources(ClientPtr client)
|
FreeClientResources(ClientPtr client)
|
||||||
{
|
{
|
||||||
register ResourcePtr *resources;
|
ResourcePtr *resources;
|
||||||
register ResourcePtr this;
|
ResourcePtr this;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
/* This routine shouldn't be called with a null client, but just in
|
/* This routine shouldn't be called with a null client, but just in
|
||||||
|
@ -856,7 +856,7 @@ FreeAllResources()
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
LegalNewID(XID id, register ClientPtr client)
|
LegalNewID(XID id, ClientPtr client)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
|
@ -887,7 +887,7 @@ _X_EXPORT pointer
|
||||||
SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode)
|
SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode)
|
||||||
{
|
{
|
||||||
int cid;
|
int cid;
|
||||||
register ResourcePtr res;
|
ResourcePtr res;
|
||||||
pointer retval = NULL;
|
pointer retval = NULL;
|
||||||
|
|
||||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||||
|
@ -914,7 +914,7 @@ _X_EXPORT pointer
|
||||||
SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode)
|
SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode)
|
||||||
{
|
{
|
||||||
int cid;
|
int cid;
|
||||||
register ResourcePtr res = NULL;
|
ResourcePtr res = NULL;
|
||||||
pointer retval = NULL;
|
pointer retval = NULL;
|
||||||
|
|
||||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||||
|
|
|
@ -73,10 +73,10 @@ static void SwapFont(xQueryFontReply *pr, Bool hasGlyphs);
|
||||||
* \param size size in bytes
|
* \param size size in bytes
|
||||||
*/
|
*/
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
Swap32Write(ClientPtr pClient, int size, register CARD32 *pbuf)
|
Swap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
size >>= 2;
|
size >>= 2;
|
||||||
for(i = 0; i < size; i++)
|
for(i = 0; i < size; i++)
|
||||||
|
@ -97,7 +97,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
|
||||||
{
|
{
|
||||||
int bufsize = size;
|
int bufsize = size;
|
||||||
CARD32 *pbufT;
|
CARD32 *pbufT;
|
||||||
register CARD32 *from, *to, *fromLast, *toLast;
|
CARD32 *from, *to, *fromLast, *toLast;
|
||||||
CARD32 tmpbuf[1];
|
CARD32 tmpbuf[1];
|
||||||
|
|
||||||
/* Allocate as big a buffer as we can... */
|
/* Allocate as big a buffer as we can... */
|
||||||
|
@ -145,7 +145,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
|
||||||
{
|
{
|
||||||
int bufsize = size;
|
int bufsize = size;
|
||||||
short *pbufT;
|
short *pbufT;
|
||||||
register short *from, *to, *fromLast, *toLast;
|
short *from, *to, *fromLast, *toLast;
|
||||||
short tmpbuf[2];
|
short tmpbuf[2];
|
||||||
|
|
||||||
/* Allocate as big a buffer as we can... */
|
/* Allocate as big a buffer as we can... */
|
||||||
|
@ -189,7 +189,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
|
||||||
void
|
void
|
||||||
SGenericReply(ClientPtr pClient, int size, xGenericReply *pRep)
|
SGenericReply(ClientPtr pClient, int size, xGenericReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
|
@ -200,7 +200,7 @@ void
|
||||||
SGetWindowAttributesReply(ClientPtr pClient, int size,
|
SGetWindowAttributesReply(ClientPtr pClient, int size,
|
||||||
xGetWindowAttributesReply *pRep)
|
xGetWindowAttributesReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -218,7 +218,7 @@ SGetWindowAttributesReply(ClientPtr pClient, int size,
|
||||||
void
|
void
|
||||||
SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep)
|
SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->root, n);
|
swapl(&pRep->root, n);
|
||||||
|
@ -233,7 +233,7 @@ SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep)
|
||||||
void
|
void
|
||||||
SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep)
|
SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -246,7 +246,7 @@ SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep)
|
||||||
void
|
void
|
||||||
SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep)
|
SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->atom, n);
|
swapl(&pRep->atom, n);
|
||||||
|
@ -256,7 +256,7 @@ SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep)
|
||||||
void
|
void
|
||||||
SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
|
SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -268,7 +268,7 @@ SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
|
||||||
void
|
void
|
||||||
SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep)
|
SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -281,7 +281,7 @@ SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep)
|
||||||
void
|
void
|
||||||
SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply *pRep)
|
SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -293,7 +293,7 @@ void
|
||||||
SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
||||||
xGetSelectionOwnerReply *pRep)
|
xGetSelectionOwnerReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->owner, n);
|
swapl(&pRep->owner, n);
|
||||||
|
@ -304,7 +304,7 @@ SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
||||||
void
|
void
|
||||||
SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->root, n);
|
swapl(&pRep->root, n);
|
||||||
|
@ -320,7 +320,7 @@ SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
||||||
void
|
void
|
||||||
SwapTimecoord(xTimecoord* pCoord)
|
SwapTimecoord(xTimecoord* pCoord)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swapl(&pCoord->time, n);
|
swapl(&pCoord->time, n);
|
||||||
swaps(&pCoord->x, n);
|
swaps(&pCoord->x, n);
|
||||||
|
@ -346,7 +346,7 @@ SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord *pRep)
|
||||||
void
|
void
|
||||||
SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep)
|
SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -357,7 +357,7 @@ SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep)
|
||||||
void
|
void
|
||||||
STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep)
|
STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->child, n);
|
swapl(&pRep->child, n);
|
||||||
|
@ -369,7 +369,7 @@ STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep)
|
||||||
void
|
void
|
||||||
SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
|
SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->focus, n);
|
swapl(&pRep->focus, n);
|
||||||
|
@ -380,7 +380,7 @@ SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
|
||||||
void
|
void
|
||||||
SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
|
SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -390,7 +390,7 @@ SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
|
||||||
static void
|
static void
|
||||||
SwapCharInfo(xCharInfo *pInfo)
|
SwapCharInfo(xCharInfo *pInfo)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pInfo->leftSideBearing, n);
|
swaps(&pInfo->leftSideBearing, n);
|
||||||
swaps(&pInfo->rightSideBearing, n);
|
swaps(&pInfo->rightSideBearing, n);
|
||||||
|
@ -403,7 +403,7 @@ SwapCharInfo(xCharInfo *pInfo)
|
||||||
static void
|
static void
|
||||||
SwapFontInfo(xQueryFontReply *pr)
|
SwapFontInfo(xQueryFontReply *pr)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pr->minCharOrByte2, n);
|
swaps(&pr->minCharOrByte2, n);
|
||||||
swaps(&pr->maxCharOrByte2, n);
|
swaps(&pr->maxCharOrByte2, n);
|
||||||
|
@ -423,7 +423,7 @@ SwapFont(xQueryFontReply *pr, Bool hasGlyphs)
|
||||||
xCharInfo * pxci;
|
xCharInfo * pxci;
|
||||||
unsigned nchars, nprops;
|
unsigned nchars, nprops;
|
||||||
char *pby;
|
char *pby;
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pr->sequenceNumber, n);
|
swaps(&pr->sequenceNumber, n);
|
||||||
swapl(&pr->length, n);
|
swapl(&pr->length, n);
|
||||||
|
@ -458,7 +458,7 @@ SQueryFontReply(ClientPtr pClient, int size, xQueryFontReply *pRep)
|
||||||
void
|
void
|
||||||
SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep)
|
SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swaps(&pRep->fontAscent, n);
|
swaps(&pRep->fontAscent, n);
|
||||||
|
@ -474,7 +474,7 @@ SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep
|
||||||
void
|
void
|
||||||
SListFontsReply(ClientPtr pClient, int size, xListFontsReply *pRep)
|
SListFontsReply(ClientPtr pClient, int size, xListFontsReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -493,7 +493,7 @@ SListFontsWithInfoReply(ClientPtr pClient, int size,
|
||||||
void
|
void
|
||||||
SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep)
|
SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -504,7 +504,7 @@ SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep)
|
||||||
void
|
void
|
||||||
SGetImageReply(ClientPtr pClient, int size, xGetImageReply *pRep)
|
SGetImageReply(ClientPtr pClient, int size, xGetImageReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -517,7 +517,7 @@ void
|
||||||
SListInstalledColormapsReply(ClientPtr pClient, int size,
|
SListInstalledColormapsReply(ClientPtr pClient, int size,
|
||||||
xListInstalledColormapsReply *pRep)
|
xListInstalledColormapsReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -531,7 +531,7 @@ SAllocColorReply(pClient, size, pRep)
|
||||||
int size;
|
int size;
|
||||||
xAllocColorReply *pRep;
|
xAllocColorReply *pRep;
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swaps(&pRep->red, n);
|
swaps(&pRep->red, n);
|
||||||
|
@ -544,7 +544,7 @@ SAllocColorReply(pClient, size, pRep)
|
||||||
void
|
void
|
||||||
SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep)
|
SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->pixel, n);
|
swapl(&pRep->pixel, n);
|
||||||
|
@ -560,7 +560,7 @@ SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep)
|
||||||
void
|
void
|
||||||
SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
|
SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -573,7 +573,7 @@ SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
|
||||||
void
|
void
|
||||||
SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep)
|
SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -587,7 +587,7 @@ SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep
|
||||||
void
|
void
|
||||||
SwapRGB(xrgb *prgb)
|
SwapRGB(xrgb *prgb)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&prgb->red, n);
|
swaps(&prgb->red, n);
|
||||||
swaps(&prgb->green, n);
|
swaps(&prgb->green, n);
|
||||||
|
@ -613,7 +613,7 @@ SQColorsExtend(ClientPtr pClient, int size, xrgb *prgb)
|
||||||
void
|
void
|
||||||
SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep)
|
SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -624,7 +624,7 @@ SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep)
|
||||||
void
|
void
|
||||||
SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep)
|
SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swaps(&pRep->exactRed, n);
|
swaps(&pRep->exactRed, n);
|
||||||
|
@ -639,7 +639,7 @@ SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep)
|
||||||
void
|
void
|
||||||
SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep)
|
SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swaps(&pRep->width, n);
|
swaps(&pRep->width, n);
|
||||||
|
@ -650,7 +650,7 @@ SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep)
|
||||||
void
|
void
|
||||||
SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply *pRep)
|
SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -661,7 +661,7 @@ void
|
||||||
SGetKeyboardMappingReply(ClientPtr pClient, int size,
|
SGetKeyboardMappingReply(ClientPtr pClient, int size,
|
||||||
xGetKeyboardMappingReply *pRep)
|
xGetKeyboardMappingReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -672,7 +672,7 @@ void
|
||||||
SGetPointerMappingReply(ClientPtr pClient, int size,
|
SGetPointerMappingReply(ClientPtr pClient, int size,
|
||||||
xGetPointerMappingReply *pRep)
|
xGetPointerMappingReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -683,7 +683,7 @@ void
|
||||||
SGetModifierMappingReply(ClientPtr pClient, int size,
|
SGetModifierMappingReply(ClientPtr pClient, int size,
|
||||||
xGetModifierMappingReply *pRep)
|
xGetModifierMappingReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -693,7 +693,7 @@ SGetModifierMappingReply(ClientPtr pClient, int size,
|
||||||
void
|
void
|
||||||
SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *pRep)
|
SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
@ -706,7 +706,7 @@ SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *
|
||||||
void
|
void
|
||||||
SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pRep)
|
SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swaps(&pRep->accelNumerator, n);
|
swaps(&pRep->accelNumerator, n);
|
||||||
|
@ -718,7 +718,7 @@ SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pR
|
||||||
void
|
void
|
||||||
SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply *pRep)
|
SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swaps(&pRep->timeout, n);
|
swaps(&pRep->timeout, n);
|
||||||
|
@ -734,7 +734,7 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
|
||||||
while (bufT < endbuf) {
|
while (bufT < endbuf) {
|
||||||
xHostEntry *host = (xHostEntry *) bufT;
|
xHostEntry *host = (xHostEntry *) bufT;
|
||||||
int len = host->length;
|
int len = host->length;
|
||||||
register char n;
|
char n;
|
||||||
swaps (&host->length, n);
|
swaps (&host->length, n);
|
||||||
bufT += sizeof (xHostEntry) + (((len + 3) >> 2) << 2);
|
bufT += sizeof (xHostEntry) + (((len + 3) >> 2) << 2);
|
||||||
}
|
}
|
||||||
|
@ -744,7 +744,7 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
|
||||||
void
|
void
|
||||||
SListHostsReply(ClientPtr pClient, int size, xListHostsReply *pRep)
|
SListHostsReply(ClientPtr pClient, int size, xListHostsReply *pRep)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber, n);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length, n);
|
||||||
|
|
276
dix/swapreq.c
276
dix/swapreq.c
|
@ -63,9 +63,9 @@ SOFTWARE.
|
||||||
|
|
||||||
/* Byte swap a list of longs */
|
/* Byte swap a list of longs */
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
SwapLongs (register CARD32 *list, register unsigned long count)
|
SwapLongs (CARD32 *list, unsigned long count)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
while (count >= 8) {
|
while (count >= 8) {
|
||||||
swapl(list+0, n);
|
swapl(list+0, n);
|
||||||
|
@ -89,9 +89,9 @@ SwapLongs (register CARD32 *list, register unsigned long count)
|
||||||
|
|
||||||
/* Byte swap a list of shorts */
|
/* Byte swap a list of shorts */
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
SwapShorts (register short *list, register unsigned long count)
|
SwapShorts (short *list, unsigned long count)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
while (count >= 16) {
|
while (count >= 16) {
|
||||||
swaps(list+0, n);
|
swaps(list+0, n);
|
||||||
|
@ -124,9 +124,9 @@ SwapShorts (register short *list, register unsigned long count)
|
||||||
/* The following is used for all requests that have
|
/* The following is used for all requests that have
|
||||||
no fields to be swapped (except "length") */
|
no fields to be swapped (except "length") */
|
||||||
int
|
int
|
||||||
SProcSimpleReq(register ClientPtr client)
|
SProcSimpleReq(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
|
@ -137,9 +137,9 @@ SProcSimpleReq(register ClientPtr client)
|
||||||
only a single 32-bit field to be swapped, coming
|
only a single 32-bit field to be swapped, coming
|
||||||
right after the "length" field */
|
right after the "length" field */
|
||||||
int
|
int
|
||||||
SProcResourceReq(register ClientPtr client)
|
SProcResourceReq(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
|
@ -149,9 +149,9 @@ SProcResourceReq(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcCreateWindow(register ClientPtr client)
|
SProcCreateWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
REQUEST(xCreateWindowReq);
|
REQUEST(xCreateWindowReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
|
@ -171,9 +171,9 @@ SProcCreateWindow(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcChangeWindowAttributes(register ClientPtr client)
|
SProcChangeWindowAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
REQUEST(xChangeWindowAttributesReq);
|
REQUEST(xChangeWindowAttributesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
|
@ -185,9 +185,9 @@ SProcChangeWindowAttributes(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcReparentWindow(register ClientPtr client)
|
SProcReparentWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xReparentWindowReq);
|
REQUEST(xReparentWindowReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xReparentWindowReq);
|
REQUEST_SIZE_MATCH(xReparentWindowReq);
|
||||||
|
@ -199,9 +199,9 @@ SProcReparentWindow(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcConfigureWindow(register ClientPtr client)
|
SProcConfigureWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xConfigureWindowReq);
|
REQUEST(xConfigureWindowReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
|
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
|
||||||
|
@ -214,9 +214,9 @@ SProcConfigureWindow(register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcInternAtom(register ClientPtr client)
|
SProcInternAtom(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xInternAtomReq);
|
REQUEST(xInternAtomReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xInternAtomReq);
|
REQUEST_AT_LEAST_SIZE(xInternAtomReq);
|
||||||
|
@ -225,9 +225,9 @@ SProcInternAtom(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcChangeProperty(register ClientPtr client)
|
SProcChangeProperty(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xChangePropertyReq);
|
REQUEST(xChangePropertyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangePropertyReq);
|
REQUEST_AT_LEAST_SIZE(xChangePropertyReq);
|
||||||
|
@ -249,9 +249,9 @@ SProcChangeProperty(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcDeleteProperty(register ClientPtr client)
|
SProcDeleteProperty(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xDeletePropertyReq);
|
REQUEST(xDeletePropertyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xDeletePropertyReq);
|
REQUEST_SIZE_MATCH(xDeletePropertyReq);
|
||||||
|
@ -262,9 +262,9 @@ SProcDeleteProperty(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcGetProperty(register ClientPtr client)
|
SProcGetProperty(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xGetPropertyReq);
|
REQUEST(xGetPropertyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xGetPropertyReq);
|
REQUEST_SIZE_MATCH(xGetPropertyReq);
|
||||||
|
@ -277,9 +277,9 @@ SProcGetProperty(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcSetSelectionOwner(register ClientPtr client)
|
SProcSetSelectionOwner(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xSetSelectionOwnerReq);
|
REQUEST(xSetSelectionOwnerReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xSetSelectionOwnerReq);
|
REQUEST_SIZE_MATCH(xSetSelectionOwnerReq);
|
||||||
|
@ -290,9 +290,9 @@ SProcSetSelectionOwner(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcConvertSelection(register ClientPtr client)
|
SProcConvertSelection(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xConvertSelectionReq);
|
REQUEST(xConvertSelectionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xConvertSelectionReq);
|
REQUEST_SIZE_MATCH(xConvertSelectionReq);
|
||||||
|
@ -305,9 +305,9 @@ SProcConvertSelection(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcSendEvent(register ClientPtr client)
|
SProcSendEvent(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
xEvent eventT;
|
xEvent eventT;
|
||||||
EventSwapPtr proc;
|
EventSwapPtr proc;
|
||||||
REQUEST(xSendEventReq);
|
REQUEST(xSendEventReq);
|
||||||
|
@ -327,9 +327,9 @@ SProcSendEvent(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcGrabPointer(register ClientPtr client)
|
SProcGrabPointer(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xGrabPointerReq);
|
REQUEST(xGrabPointerReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xGrabPointerReq);
|
REQUEST_SIZE_MATCH(xGrabPointerReq);
|
||||||
|
@ -342,9 +342,9 @@ SProcGrabPointer(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcGrabButton(register ClientPtr client)
|
SProcGrabButton(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xGrabButtonReq);
|
REQUEST(xGrabButtonReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xGrabButtonReq);
|
REQUEST_SIZE_MATCH(xGrabButtonReq);
|
||||||
|
@ -357,9 +357,9 @@ SProcGrabButton(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcUngrabButton(register ClientPtr client)
|
SProcUngrabButton(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xUngrabButtonReq);
|
REQUEST(xUngrabButtonReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xUngrabButtonReq);
|
REQUEST_SIZE_MATCH(xUngrabButtonReq);
|
||||||
|
@ -369,9 +369,9 @@ SProcUngrabButton(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcChangeActivePointerGrab(register ClientPtr client)
|
SProcChangeActivePointerGrab(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xChangeActivePointerGrabReq);
|
REQUEST(xChangeActivePointerGrabReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq);
|
REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq);
|
||||||
|
@ -382,9 +382,9 @@ SProcChangeActivePointerGrab(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcGrabKeyboard(register ClientPtr client)
|
SProcGrabKeyboard(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xGrabKeyboardReq);
|
REQUEST(xGrabKeyboardReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
|
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
|
||||||
|
@ -394,9 +394,9 @@ SProcGrabKeyboard(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcGrabKey(register ClientPtr client)
|
SProcGrabKey(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xGrabKeyReq);
|
REQUEST(xGrabKeyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xGrabKeyReq);
|
REQUEST_SIZE_MATCH(xGrabKeyReq);
|
||||||
|
@ -406,9 +406,9 @@ SProcGrabKey(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcUngrabKey(register ClientPtr client)
|
SProcUngrabKey(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xUngrabKeyReq);
|
REQUEST(xUngrabKeyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xUngrabKeyReq);
|
REQUEST_SIZE_MATCH(xUngrabKeyReq);
|
||||||
|
@ -418,9 +418,9 @@ SProcUngrabKey(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcGetMotionEvents(register ClientPtr client)
|
SProcGetMotionEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xGetMotionEventsReq);
|
REQUEST(xGetMotionEventsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xGetMotionEventsReq);
|
REQUEST_SIZE_MATCH(xGetMotionEventsReq);
|
||||||
|
@ -431,9 +431,9 @@ SProcGetMotionEvents(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcTranslateCoords(register ClientPtr client)
|
SProcTranslateCoords(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xTranslateCoordsReq);
|
REQUEST(xTranslateCoordsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xTranslateCoordsReq);
|
REQUEST_SIZE_MATCH(xTranslateCoordsReq);
|
||||||
|
@ -445,9 +445,9 @@ SProcTranslateCoords(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcWarpPointer(register ClientPtr client)
|
SProcWarpPointer(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xWarpPointerReq);
|
REQUEST(xWarpPointerReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xWarpPointerReq);
|
REQUEST_SIZE_MATCH(xWarpPointerReq);
|
||||||
|
@ -463,9 +463,9 @@ SProcWarpPointer(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcSetInputFocus(register ClientPtr client)
|
SProcSetInputFocus(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xSetInputFocusReq);
|
REQUEST(xSetInputFocusReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xSetInputFocusReq);
|
REQUEST_SIZE_MATCH(xSetInputFocusReq);
|
||||||
|
@ -475,9 +475,9 @@ SProcSetInputFocus(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcOpenFont(register ClientPtr client)
|
SProcOpenFont(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xOpenFontReq);
|
REQUEST(xOpenFontReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xOpenFontReq);
|
REQUEST_AT_LEAST_SIZE(xOpenFontReq);
|
||||||
|
@ -487,9 +487,9 @@ SProcOpenFont(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcListFonts(register ClientPtr client)
|
SProcListFonts(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xListFontsReq);
|
REQUEST(xListFontsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xListFontsReq);
|
REQUEST_AT_LEAST_SIZE(xListFontsReq);
|
||||||
|
@ -499,9 +499,9 @@ SProcListFonts(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcListFontsWithInfo(register ClientPtr client)
|
SProcListFontsWithInfo(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xListFontsWithInfoReq);
|
REQUEST(xListFontsWithInfoReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xListFontsWithInfoReq);
|
REQUEST_AT_LEAST_SIZE(xListFontsWithInfoReq);
|
||||||
|
@ -511,9 +511,9 @@ SProcListFontsWithInfo(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcSetFontPath(register ClientPtr client)
|
SProcSetFontPath(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xSetFontPathReq);
|
REQUEST(xSetFontPathReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
|
REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
|
||||||
|
@ -522,9 +522,9 @@ SProcSetFontPath(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcCreatePixmap(register ClientPtr client)
|
SProcCreatePixmap(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xCreatePixmapReq);
|
REQUEST(xCreatePixmapReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
|
@ -537,9 +537,9 @@ SProcCreatePixmap(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcCreateGC(register ClientPtr client)
|
SProcCreateGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xCreateGCReq);
|
REQUEST(xCreateGCReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xCreateGCReq);
|
REQUEST_AT_LEAST_SIZE(xCreateGCReq);
|
||||||
|
@ -551,9 +551,9 @@ SProcCreateGC(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcChangeGC(register ClientPtr client)
|
SProcChangeGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xChangeGCReq);
|
REQUEST(xChangeGCReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeGCReq);
|
REQUEST_AT_LEAST_SIZE(xChangeGCReq);
|
||||||
|
@ -564,9 +564,9 @@ SProcChangeGC(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcCopyGC(register ClientPtr client)
|
SProcCopyGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xCopyGCReq);
|
REQUEST(xCopyGCReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xCopyGCReq);
|
REQUEST_SIZE_MATCH(xCopyGCReq);
|
||||||
|
@ -577,9 +577,9 @@ SProcCopyGC(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcSetDashes(register ClientPtr client)
|
SProcSetDashes(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xSetDashesReq);
|
REQUEST(xSetDashesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xSetDashesReq);
|
REQUEST_AT_LEAST_SIZE(xSetDashesReq);
|
||||||
|
@ -591,9 +591,9 @@ SProcSetDashes(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcSetClipRectangles(register ClientPtr client)
|
SProcSetClipRectangles(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xSetClipRectanglesReq);
|
REQUEST(xSetClipRectanglesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
|
REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
|
||||||
|
@ -605,9 +605,9 @@ SProcSetClipRectangles(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcClearToBackground(register ClientPtr client)
|
SProcClearToBackground(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xClearAreaReq);
|
REQUEST(xClearAreaReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xClearAreaReq);
|
REQUEST_SIZE_MATCH(xClearAreaReq);
|
||||||
|
@ -620,9 +620,9 @@ SProcClearToBackground(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcCopyArea(register ClientPtr client)
|
SProcCopyArea(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xCopyAreaReq);
|
REQUEST(xCopyAreaReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xCopyAreaReq);
|
REQUEST_SIZE_MATCH(xCopyAreaReq);
|
||||||
|
@ -639,9 +639,9 @@ SProcCopyArea(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcCopyPlane(register ClientPtr client)
|
SProcCopyPlane(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xCopyPlaneReq);
|
REQUEST(xCopyPlaneReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xCopyPlaneReq);
|
REQUEST_SIZE_MATCH(xCopyPlaneReq);
|
||||||
|
@ -661,9 +661,9 @@ SProcCopyPlane(register ClientPtr client)
|
||||||
/* The following routine is used for all Poly drawing requests
|
/* The following routine is used for all Poly drawing requests
|
||||||
(except FillPoly, which uses a different request format) */
|
(except FillPoly, which uses a different request format) */
|
||||||
int
|
int
|
||||||
SProcPoly(register ClientPtr client)
|
SProcPoly(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
REQUEST(xPolyPointReq);
|
REQUEST(xPolyPointReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
|
@ -678,9 +678,9 @@ SProcPoly(register ClientPtr client)
|
||||||
is longer than xPolyPointReq, and we don't want to swap
|
is longer than xPolyPointReq, and we don't want to swap
|
||||||
the difference as shorts! */
|
the difference as shorts! */
|
||||||
int
|
int
|
||||||
SProcFillPoly(register ClientPtr client)
|
SProcFillPoly(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
REQUEST(xFillPolyReq);
|
REQUEST(xFillPolyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
|
@ -692,9 +692,9 @@ SProcFillPoly(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcPutImage(register ClientPtr client)
|
SProcPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xPutImageReq);
|
REQUEST(xPutImageReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xPutImageReq);
|
REQUEST_AT_LEAST_SIZE(xPutImageReq);
|
||||||
|
@ -710,9 +710,9 @@ SProcPutImage(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcGetImage(register ClientPtr client)
|
SProcGetImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xGetImageReq);
|
REQUEST(xGetImageReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xGetImageReq);
|
REQUEST_SIZE_MATCH(xGetImageReq);
|
||||||
|
@ -728,9 +728,9 @@ SProcGetImage(register ClientPtr client)
|
||||||
/* ProcPolyText used for both PolyText8 and PolyText16 */
|
/* ProcPolyText used for both PolyText8 and PolyText16 */
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcPolyText(register ClientPtr client)
|
SProcPolyText(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xPolyTextReq);
|
REQUEST(xPolyTextReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
|
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
|
||||||
|
@ -744,9 +744,9 @@ SProcPolyText(register ClientPtr client)
|
||||||
/* ProcImageText used for both ImageText8 and ImageText16 */
|
/* ProcImageText used for both ImageText8 and ImageText16 */
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcImageText(register ClientPtr client)
|
SProcImageText(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xImageTextReq);
|
REQUEST(xImageTextReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xImageTextReq);
|
REQUEST_AT_LEAST_SIZE(xImageTextReq);
|
||||||
|
@ -758,9 +758,9 @@ SProcImageText(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcCreateColormap(register ClientPtr client)
|
SProcCreateColormap(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xCreateColormapReq);
|
REQUEST(xCreateColormapReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xCreateColormapReq);
|
REQUEST_SIZE_MATCH(xCreateColormapReq);
|
||||||
|
@ -772,9 +772,9 @@ SProcCreateColormap(register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcCopyColormapAndFree(register ClientPtr client)
|
SProcCopyColormapAndFree(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xCopyColormapAndFreeReq);
|
REQUEST(xCopyColormapAndFreeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
|
REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
|
||||||
|
@ -785,9 +785,9 @@ SProcCopyColormapAndFree(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcAllocColor(register ClientPtr client)
|
SProcAllocColor(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xAllocColorReq);
|
REQUEST(xAllocColorReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xAllocColorReq);
|
REQUEST_SIZE_MATCH(xAllocColorReq);
|
||||||
|
@ -799,9 +799,9 @@ SProcAllocColor(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcAllocNamedColor(register ClientPtr client)
|
SProcAllocNamedColor(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
REQUEST(xAllocNamedColorReq);
|
REQUEST(xAllocNamedColorReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
|
@ -812,9 +812,9 @@ SProcAllocNamedColor(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcAllocColorCells(register ClientPtr client)
|
SProcAllocColorCells(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xAllocColorCellsReq);
|
REQUEST(xAllocColorCellsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xAllocColorCellsReq);
|
REQUEST_SIZE_MATCH(xAllocColorCellsReq);
|
||||||
|
@ -825,9 +825,9 @@ SProcAllocColorCells(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcAllocColorPlanes(register ClientPtr client)
|
SProcAllocColorPlanes(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xAllocColorPlanesReq);
|
REQUEST(xAllocColorPlanesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
|
REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
|
||||||
|
@ -840,9 +840,9 @@ SProcAllocColorPlanes(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcFreeColors(register ClientPtr client)
|
SProcFreeColors(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xFreeColorsReq);
|
REQUEST(xFreeColorsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
|
REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
|
||||||
|
@ -856,7 +856,7 @@ SProcFreeColors(register ClientPtr client)
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
SwapColorItem(xColorItem *pItem)
|
SwapColorItem(xColorItem *pItem)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swapl(&pItem->pixel, n);
|
swapl(&pItem->pixel, n);
|
||||||
swaps(&pItem->red, n);
|
swaps(&pItem->red, n);
|
||||||
|
@ -865,9 +865,9 @@ SwapColorItem(xColorItem *pItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcStoreColors(register ClientPtr client)
|
SProcStoreColors(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
long count;
|
long count;
|
||||||
xColorItem *pItem;
|
xColorItem *pItem;
|
||||||
|
|
||||||
|
@ -882,9 +882,9 @@ SProcStoreColors(register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcStoreNamedColor (register ClientPtr client)
|
SProcStoreNamedColor (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xStoreNamedColorReq);
|
REQUEST(xStoreNamedColorReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xStoreNamedColorReq);
|
REQUEST_AT_LEAST_SIZE(xStoreNamedColorReq);
|
||||||
|
@ -895,9 +895,9 @@ SProcStoreNamedColor (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcQueryColors (register ClientPtr client)
|
SProcQueryColors (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xQueryColorsReq);
|
REQUEST(xQueryColorsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
|
REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
|
||||||
|
@ -907,9 +907,9 @@ SProcQueryColors (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcLookupColor (register ClientPtr client)
|
SProcLookupColor (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xLookupColorReq);
|
REQUEST(xLookupColorReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xLookupColorReq);
|
REQUEST_AT_LEAST_SIZE(xLookupColorReq);
|
||||||
|
@ -919,9 +919,9 @@ SProcLookupColor (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcCreateCursor (register ClientPtr client)
|
SProcCreateCursor (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xCreateCursorReq);
|
REQUEST(xCreateCursorReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xCreateCursorReq);
|
REQUEST_SIZE_MATCH(xCreateCursorReq);
|
||||||
|
@ -940,9 +940,9 @@ SProcCreateCursor (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcCreateGlyphCursor (register ClientPtr client)
|
SProcCreateGlyphCursor (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xCreateGlyphCursorReq);
|
REQUEST(xCreateGlyphCursorReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xCreateGlyphCursorReq);
|
REQUEST_SIZE_MATCH(xCreateGlyphCursorReq);
|
||||||
|
@ -962,9 +962,9 @@ SProcCreateGlyphCursor (register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcRecolorCursor (register ClientPtr client)
|
SProcRecolorCursor (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xRecolorCursorReq);
|
REQUEST(xRecolorCursorReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xRecolorCursorReq);
|
REQUEST_SIZE_MATCH(xRecolorCursorReq);
|
||||||
|
@ -979,9 +979,9 @@ SProcRecolorCursor (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcQueryBestSize (register ClientPtr client)
|
SProcQueryBestSize (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xQueryBestSizeReq);
|
REQUEST(xQueryBestSizeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xQueryBestSizeReq);
|
REQUEST_SIZE_MATCH(xQueryBestSizeReq);
|
||||||
|
@ -993,9 +993,9 @@ SProcQueryBestSize (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcQueryExtension (register ClientPtr client)
|
SProcQueryExtension (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xQueryExtensionReq);
|
REQUEST(xQueryExtensionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xQueryExtensionReq);
|
REQUEST_AT_LEAST_SIZE(xQueryExtensionReq);
|
||||||
|
@ -1004,9 +1004,9 @@ SProcQueryExtension (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcChangeKeyboardMapping (register ClientPtr client)
|
SProcChangeKeyboardMapping (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xChangeKeyboardMappingReq);
|
REQUEST(xChangeKeyboardMappingReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq);
|
REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq);
|
||||||
|
@ -1016,9 +1016,9 @@ SProcChangeKeyboardMapping (register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcChangeKeyboardControl (register ClientPtr client)
|
SProcChangeKeyboardControl (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xChangeKeyboardControlReq);
|
REQUEST(xChangeKeyboardControlReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq);
|
REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq);
|
||||||
|
@ -1028,9 +1028,9 @@ SProcChangeKeyboardControl (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcChangePointerControl (register ClientPtr client)
|
SProcChangePointerControl (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xChangePointerControlReq);
|
REQUEST(xChangePointerControlReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xChangePointerControlReq);
|
REQUEST_SIZE_MATCH(xChangePointerControlReq);
|
||||||
|
@ -1042,9 +1042,9 @@ SProcChangePointerControl (register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcSetScreenSaver (register ClientPtr client)
|
SProcSetScreenSaver (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xSetScreenSaverReq);
|
REQUEST(xSetScreenSaverReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xSetScreenSaverReq);
|
REQUEST_SIZE_MATCH(xSetScreenSaverReq);
|
||||||
|
@ -1054,9 +1054,9 @@ SProcSetScreenSaver (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcChangeHosts (register ClientPtr client)
|
SProcChangeHosts (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
REQUEST(xChangeHostsReq);
|
REQUEST(xChangeHostsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
|
@ -1066,9 +1066,9 @@ SProcChangeHosts (register ClientPtr client)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int SProcRotateProperties (register ClientPtr client)
|
int SProcRotateProperties (ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xRotatePropertiesReq);
|
REQUEST(xRotatePropertiesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq);
|
REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq);
|
||||||
|
@ -1080,9 +1080,9 @@ int SProcRotateProperties (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcNoOperation(register ClientPtr client)
|
SProcNoOperation(ClientPtr client)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
return ((* ProcVector[X_NoOperation])(client));
|
return ((* ProcVector[X_NoOperation])(client));
|
||||||
|
@ -1091,7 +1091,7 @@ SProcNoOperation(register ClientPtr client)
|
||||||
void
|
void
|
||||||
SwapConnClientPrefix(xConnClientPrefix *pCCP)
|
SwapConnClientPrefix(xConnClientPrefix *pCCP)
|
||||||
{
|
{
|
||||||
register char n;
|
char n;
|
||||||
|
|
||||||
swaps(&pCCP->majorVersion, n);
|
swaps(&pCCP->majorVersion, n);
|
||||||
swaps(&pCCP->minorVersion, n);
|
swaps(&pCCP->minorVersion, n);
|
||||||
|
|
192
dix/window.c
192
dix/window.c
|
@ -230,10 +230,10 @@ PrintWindowTree(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
TraverseTree(register WindowPtr pWin, VisitWindowProcPtr func, pointer data)
|
TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data)
|
||||||
{
|
{
|
||||||
register int result;
|
int result;
|
||||||
register WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
|
|
||||||
if (!(pChild = pWin))
|
if (!(pChild = pWin))
|
||||||
return(WT_NOMATCH);
|
return(WT_NOMATCH);
|
||||||
|
@ -279,7 +279,7 @@ Bool enableBackingStore = FALSE;
|
||||||
Bool disableSaveUnders = FALSE;
|
Bool disableSaveUnders = FALSE;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SetWindowToDefaults(register WindowPtr pWin)
|
SetWindowToDefaults(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
pWin->prevSib = NullWindow;
|
pWin->prevSib = NullWindow;
|
||||||
pWin->firstChild = NullWindow;
|
pWin->firstChild = NullWindow;
|
||||||
|
@ -323,8 +323,8 @@ MakeRootTile(WindowPtr pWin)
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
unsigned char back[128];
|
unsigned char back[128];
|
||||||
int len = BitmapBytePad(sizeof(long));
|
int len = BitmapBytePad(sizeof(long));
|
||||||
register unsigned char *from, *to;
|
unsigned char *from, *to;
|
||||||
register int i, j;
|
int i, j;
|
||||||
|
|
||||||
pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
|
pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
|
||||||
pScreen->rootDepth);
|
pScreen->rootDepth);
|
||||||
|
@ -363,11 +363,11 @@ WindowPtr
|
||||||
AllocateWindow(ScreenPtr pScreen)
|
AllocateWindow(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
register char *ptr;
|
char *ptr;
|
||||||
register DevUnion *ppriv;
|
DevUnion *ppriv;
|
||||||
register unsigned *sizes;
|
unsigned *sizes;
|
||||||
register unsigned size;
|
unsigned size;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
pWin = (WindowPtr)xalloc(pScreen->totalWindowSize);
|
pWin = (WindowPtr)xalloc(pScreen->totalWindowSize);
|
||||||
if (pWin)
|
if (pWin)
|
||||||
|
@ -558,9 +558,9 @@ InitRootWindow(WindowPtr pWin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
|
ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn,
|
||||||
register int x, register int y,
|
int x, int y,
|
||||||
register int w, register int h)
|
int w, int h)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
@ -597,7 +597,7 @@ RegisterRealChildHeadProc (RealChildHeadProc proc)
|
||||||
|
|
||||||
|
|
||||||
WindowPtr
|
WindowPtr
|
||||||
RealChildHead(register WindowPtr pWin)
|
RealChildHead(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
if (realChildHeadProc) {
|
if (realChildHeadProc) {
|
||||||
return realChildHeadProc (pWin);
|
return realChildHeadProc (pWin);
|
||||||
|
@ -617,19 +617,19 @@ RealChildHead(register WindowPtr pWin)
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
_X_EXPORT WindowPtr
|
_X_EXPORT WindowPtr
|
||||||
CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
|
CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
||||||
unsigned h, unsigned bw, unsigned class, register Mask vmask, XID *vlist,
|
unsigned h, unsigned bw, unsigned class, Mask vmask, XID *vlist,
|
||||||
int depth, ClientPtr client, VisualID visual, int *error)
|
int depth, ClientPtr client, VisualID visual, int *error)
|
||||||
{
|
{
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
WindowPtr pHead;
|
WindowPtr pHead;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
int idepth, ivisual;
|
int idepth, ivisual;
|
||||||
Bool fOK;
|
Bool fOK;
|
||||||
DepthPtr pDepth;
|
DepthPtr pDepth;
|
||||||
PixmapFormatRec *format;
|
PixmapFormatRec *format;
|
||||||
register WindowOptPtr ancwopt;
|
WindowOptPtr ancwopt;
|
||||||
|
|
||||||
if (class == CopyFromParent)
|
if (class == CopyFromParent)
|
||||||
class = pParent->drawable.class;
|
class = pParent->drawable.class;
|
||||||
|
@ -854,9 +854,9 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FreeWindowResources(register WindowPtr pWin)
|
FreeWindowResources(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
register ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
DeleteWindowFromAnySaveSet(pWin);
|
DeleteWindowFromAnySaveSet(pWin);
|
||||||
DeleteWindowFromAnySelections(pWin);
|
DeleteWindowFromAnySelections(pWin);
|
||||||
|
@ -887,7 +887,7 @@ FreeWindowResources(register WindowPtr pWin)
|
||||||
static void
|
static void
|
||||||
CrushTree(WindowPtr pWin)
|
CrushTree(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
register WindowPtr pChild, pSib, pParent;
|
WindowPtr pChild, pSib, pParent;
|
||||||
UnrealizeWindowProcPtr UnrealizeWindow;
|
UnrealizeWindowProcPtr UnrealizeWindow;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
|
|
||||||
|
@ -944,8 +944,8 @@ CrushTree(WindowPtr pWin)
|
||||||
int
|
int
|
||||||
DeleteWindow(pointer value, XID wid)
|
DeleteWindow(pointer value, XID wid)
|
||||||
{
|
{
|
||||||
register WindowPtr pParent;
|
WindowPtr pParent;
|
||||||
register WindowPtr pWin = (WindowPtr)value;
|
WindowPtr pWin = (WindowPtr)value;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
|
|
||||||
UnmapWindow(pWin, FALSE);
|
UnmapWindow(pWin, FALSE);
|
||||||
|
@ -977,7 +977,7 @@ DeleteWindow(pointer value, XID wid)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DestroySubwindows(register WindowPtr pWin, ClientPtr client)
|
DestroySubwindows(WindowPtr pWin, ClientPtr client)
|
||||||
{
|
{
|
||||||
/* XXX
|
/* XXX
|
||||||
* The protocol is quite clear that each window should be
|
* The protocol is quite clear that each window should be
|
||||||
|
@ -1004,10 +1004,10 @@ DestroySubwindows(register WindowPtr pWin, ClientPtr client)
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
||||||
{
|
{
|
||||||
register Mask index2;
|
Mask index2;
|
||||||
register XID *pVlist;
|
XID *pVlist;
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
Pixmap pixID;
|
Pixmap pixID;
|
||||||
CursorPtr pCursor, pOldCursor;
|
CursorPtr pCursor, pOldCursor;
|
||||||
|
@ -1017,9 +1017,9 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
|
||||||
ColormapPtr pCmap;
|
ColormapPtr pCmap;
|
||||||
xEvent xE;
|
xEvent xE;
|
||||||
int result;
|
int result;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
Mask vmaskCopy = 0;
|
Mask vmaskCopy = 0;
|
||||||
register Mask tmask;
|
Mask tmask;
|
||||||
unsigned int val;
|
unsigned int val;
|
||||||
int error;
|
int error;
|
||||||
Bool checkOptional = FALSE;
|
Bool checkOptional = FALSE;
|
||||||
|
@ -1538,7 +1538,7 @@ PatchUp:
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
void
|
void
|
||||||
GetWindowAttributes(register WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply *wa)
|
GetWindowAttributes(WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply *wa)
|
||||||
{
|
{
|
||||||
wa->type = X_Reply;
|
wa->type = X_Reply;
|
||||||
wa->bitGravity = pWin->bitGravity;
|
wa->bitGravity = pWin->bitGravity;
|
||||||
|
@ -1574,9 +1574,9 @@ GetWindowAttributes(register WindowPtr pWin, ClientPtr client, xGetWindowAttribu
|
||||||
|
|
||||||
|
|
||||||
_X_EXPORT WindowPtr
|
_X_EXPORT WindowPtr
|
||||||
MoveWindowInStack(register WindowPtr pWin, register WindowPtr pNextSib)
|
MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib)
|
||||||
{
|
{
|
||||||
register WindowPtr pParent = pWin->parent;
|
WindowPtr pParent = pWin->parent;
|
||||||
WindowPtr pFirstChange = pWin; /* highest window where list changes */
|
WindowPtr pFirstChange = pWin; /* highest window where list changes */
|
||||||
|
|
||||||
if (pWin->nextSib != pNextSib)
|
if (pWin->nextSib != pNextSib)
|
||||||
|
@ -1658,7 +1658,7 @@ MoveWindowInStack(register WindowPtr pWin, register WindowPtr pNextSib)
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT RegionPtr
|
_X_EXPORT RegionPtr
|
||||||
CreateUnclippedWinSize (register WindowPtr pWin)
|
CreateUnclippedWinSize (WindowPtr pWin)
|
||||||
{
|
{
|
||||||
RegionPtr pRgn;
|
RegionPtr pRgn;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
@ -1686,7 +1686,7 @@ CreateUnclippedWinSize (register WindowPtr pWin)
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
SetWinSize (register WindowPtr pWin)
|
SetWinSize (WindowPtr pWin)
|
||||||
{
|
{
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
if (pWin->redirectDraw)
|
if (pWin->redirectDraw)
|
||||||
|
@ -1725,7 +1725,7 @@ SetWinSize (register WindowPtr pWin)
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
SetBorderSize (register WindowPtr pWin)
|
SetBorderSize (WindowPtr pWin)
|
||||||
{
|
{
|
||||||
int bw;
|
int bw;
|
||||||
|
|
||||||
|
@ -1777,9 +1777,9 @@ SetBorderSize (register WindowPtr pWin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
GravityTranslate (register int x, register int y, int oldx, int oldy,
|
GravityTranslate (int x, int y, int oldx, int oldy,
|
||||||
int dw, int dh, unsigned gravity,
|
int dw, int dh, unsigned gravity,
|
||||||
register int *destx, register int *desty)
|
int *destx, int *desty)
|
||||||
{
|
{
|
||||||
switch (gravity) {
|
switch (gravity) {
|
||||||
case NorthGravity:
|
case NorthGravity:
|
||||||
|
@ -1827,10 +1827,10 @@ GravityTranslate (register int x, register int y, int oldx, int oldy,
|
||||||
|
|
||||||
/* XXX need to retile border on each window with ParentRelative origin */
|
/* XXX need to retile border on each window with ParentRelative origin */
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
|
ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh)
|
||||||
{
|
{
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
register WindowPtr pSib, pChild;
|
WindowPtr pSib, pChild;
|
||||||
Bool resized = (dw || dh);
|
Bool resized = (dw || dh);
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
@ -1922,10 +1922,10 @@ ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
IsSiblingAboveMe(
|
IsSiblingAboveMe(
|
||||||
register WindowPtr pMe,
|
WindowPtr pMe,
|
||||||
register WindowPtr pSib)
|
WindowPtr pSib)
|
||||||
{
|
{
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
pWin = pMe->parent->firstChild;
|
pWin = pMe->parent->firstChild;
|
||||||
while (pWin)
|
while (pWin)
|
||||||
|
@ -1941,8 +1941,8 @@ IsSiblingAboveMe(
|
||||||
|
|
||||||
static BoxPtr
|
static BoxPtr
|
||||||
WindowExtents(
|
WindowExtents(
|
||||||
register WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
register BoxPtr pBox)
|
BoxPtr pBox)
|
||||||
{
|
{
|
||||||
pBox->x1 = pWin->drawable.x - wBorderWidth (pWin);
|
pBox->x1 = pWin->drawable.x - wBorderWidth (pWin);
|
||||||
pBox->y1 = pWin->drawable.y - wBorderWidth (pWin);
|
pBox->y1 = pWin->drawable.y - wBorderWidth (pWin);
|
||||||
|
@ -1958,7 +1958,7 @@ WindowExtents(
|
||||||
|
|
||||||
static RegionPtr
|
static RegionPtr
|
||||||
MakeBoundingRegion (
|
MakeBoundingRegion (
|
||||||
register WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
BoxPtr pBox)
|
BoxPtr pBox)
|
||||||
{
|
{
|
||||||
RegionPtr pRgn;
|
RegionPtr pRgn;
|
||||||
|
@ -1984,7 +1984,7 @@ ShapeOverlap (
|
||||||
BoxPtr pSibBox)
|
BoxPtr pSibBox)
|
||||||
{
|
{
|
||||||
RegionPtr pWinRgn, pSibRgn;
|
RegionPtr pWinRgn, pSibRgn;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
|
||||||
if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib))
|
if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib))
|
||||||
|
@ -2004,11 +2004,11 @@ static Bool
|
||||||
AnyWindowOverlapsMe(
|
AnyWindowOverlapsMe(
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
WindowPtr pHead,
|
WindowPtr pHead,
|
||||||
register BoxPtr box)
|
BoxPtr box)
|
||||||
{
|
{
|
||||||
register WindowPtr pSib;
|
WindowPtr pSib;
|
||||||
BoxRec sboxrec;
|
BoxRec sboxrec;
|
||||||
register BoxPtr sbox;
|
BoxPtr sbox;
|
||||||
|
|
||||||
for (pSib = pWin->prevSib; pSib != pHead; pSib = pSib->prevSib)
|
for (pSib = pWin->prevSib; pSib != pHead; pSib = pSib->prevSib)
|
||||||
{
|
{
|
||||||
|
@ -2029,11 +2029,11 @@ AnyWindowOverlapsMe(
|
||||||
static Bool
|
static Bool
|
||||||
IOverlapAnyWindow(
|
IOverlapAnyWindow(
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
register BoxPtr box)
|
BoxPtr box)
|
||||||
{
|
{
|
||||||
register WindowPtr pSib;
|
WindowPtr pSib;
|
||||||
BoxRec sboxrec;
|
BoxRec sboxrec;
|
||||||
register BoxPtr sbox;
|
BoxPtr sbox;
|
||||||
|
|
||||||
for (pSib = pWin->nextSib; pSib; pSib = pSib->nextSib)
|
for (pSib = pWin->nextSib; pSib; pSib = pSib->nextSib)
|
||||||
{
|
{
|
||||||
|
@ -2081,8 +2081,8 @@ IOverlapAnyWindow(
|
||||||
|
|
||||||
static WindowPtr
|
static WindowPtr
|
||||||
WhereDoIGoInTheStack(
|
WhereDoIGoInTheStack(
|
||||||
register WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
register WindowPtr pSib,
|
WindowPtr pSib,
|
||||||
short x,
|
short x,
|
||||||
short y,
|
short y,
|
||||||
unsigned short w,
|
unsigned short w,
|
||||||
|
@ -2090,7 +2090,7 @@ WhereDoIGoInTheStack(
|
||||||
int smode)
|
int smode)
|
||||||
{
|
{
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
WindowPtr pHead, pFirst;
|
WindowPtr pHead, pFirst;
|
||||||
|
|
||||||
if ((pWin == pWin->parent->firstChild) &&
|
if ((pWin == pWin->parent->firstChild) &&
|
||||||
|
@ -2187,8 +2187,8 @@ WhereDoIGoInTheStack(
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ReflectStackChange(
|
ReflectStackChange(
|
||||||
register WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
register WindowPtr pSib,
|
WindowPtr pSib,
|
||||||
VTKind kind)
|
VTKind kind)
|
||||||
{
|
{
|
||||||
/* Note that pSib might be NULL */
|
/* Note that pSib might be NULL */
|
||||||
|
@ -2240,17 +2240,17 @@ ReflectStackChange(
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
int
|
int
|
||||||
ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientPtr client)
|
ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
|
||||||
{
|
{
|
||||||
#define RESTACK_WIN 0
|
#define RESTACK_WIN 0
|
||||||
#define MOVE_WIN 1
|
#define MOVE_WIN 1
|
||||||
#define RESIZE_WIN 2
|
#define RESIZE_WIN 2
|
||||||
#define REBORDER_WIN 3
|
#define REBORDER_WIN 3
|
||||||
register WindowPtr pSib = NullWindow;
|
WindowPtr pSib = NullWindow;
|
||||||
register WindowPtr pParent = pWin->parent;
|
WindowPtr pParent = pWin->parent;
|
||||||
Window sibwid = 0;
|
Window sibwid = 0;
|
||||||
Mask index2, tmask;
|
Mask index2, tmask;
|
||||||
register XID *pVlist;
|
XID *pVlist;
|
||||||
short x, y, beforeX, beforeY;
|
short x, y, beforeX, beforeY;
|
||||||
unsigned short w = pWin->drawable.width,
|
unsigned short w = pWin->drawable.width,
|
||||||
h = pWin->drawable.height,
|
h = pWin->drawable.height,
|
||||||
|
@ -2527,7 +2527,7 @@ ActuallyDoSomething:
|
||||||
int
|
int
|
||||||
CirculateWindow(WindowPtr pParent, int direction, ClientPtr client)
|
CirculateWindow(WindowPtr pParent, int direction, ClientPtr client)
|
||||||
{
|
{
|
||||||
register WindowPtr pWin, pHead, pFirst;
|
WindowPtr pWin, pHead, pFirst;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
|
@ -2597,14 +2597,14 @@ CompareWIDs(
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
int
|
int
|
||||||
ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
|
ReparentWindow(WindowPtr pWin, WindowPtr pParent,
|
||||||
int x, int y, ClientPtr client)
|
int x, int y, ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pPrev, pPriorParent;
|
WindowPtr pPrev, pPriorParent;
|
||||||
Bool WasMapped = (Bool)(pWin->mapped);
|
Bool WasMapped = (Bool)(pWin->mapped);
|
||||||
xEvent event;
|
xEvent event;
|
||||||
int bw = wBorderWidth (pWin);
|
int bw = wBorderWidth (pWin);
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
if (TraverseTree(pWin, CompareWIDs, (pointer)&pParent->drawable.id) == WT_STOPWALKING)
|
if (TraverseTree(pWin, CompareWIDs, (pointer)&pParent->drawable.id) == WT_STOPWALKING)
|
||||||
|
@ -2691,7 +2691,7 @@ ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
|
||||||
static void
|
static void
|
||||||
RealizeTree(WindowPtr pWin)
|
RealizeTree(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
register WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
RealizeWindowProcPtr Realize;
|
RealizeWindowProcPtr Realize;
|
||||||
|
|
||||||
Realize = pWin->drawable.pScreen->RealizeWindow;
|
Realize = pWin->drawable.pScreen->RealizeWindow;
|
||||||
|
@ -2730,11 +2730,11 @@ RealizeTree(WindowPtr pWin)
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
MapWindow(register WindowPtr pWin, ClientPtr client)
|
MapWindow(WindowPtr pWin, ClientPtr client)
|
||||||
{
|
{
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
|
||||||
register WindowPtr pParent;
|
WindowPtr pParent;
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
Bool dosave = FALSE;
|
Bool dosave = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2850,16 +2850,16 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
void
|
void
|
||||||
MapSubwindows(register WindowPtr pParent, ClientPtr client)
|
MapSubwindows(WindowPtr pParent, ClientPtr client)
|
||||||
{
|
{
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
WindowPtr pFirstMapped = NullWindow;
|
WindowPtr pFirstMapped = NullWindow;
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
WindowPtr pFirstSaveUndered = NullWindow;
|
WindowPtr pFirstSaveUndered = NullWindow;
|
||||||
#endif
|
#endif
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
register Mask parentRedirect;
|
Mask parentRedirect;
|
||||||
register Mask parentNotify;
|
Mask parentNotify;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
Bool anyMarked;
|
Bool anyMarked;
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
|
@ -2970,7 +2970,7 @@ UnrealizeTree(
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
Bool fromConfigure)
|
Bool fromConfigure)
|
||||||
{
|
{
|
||||||
register WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
UnrealizeWindowProcPtr Unrealize;
|
UnrealizeWindowProcPtr Unrealize;
|
||||||
MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
|
MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
|
||||||
|
|
||||||
|
@ -3029,9 +3029,9 @@ UnrealizeTree(
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
|
UnmapWindow(WindowPtr pWin, Bool fromConfigure)
|
||||||
{
|
{
|
||||||
register WindowPtr pParent;
|
WindowPtr pParent;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
Bool wasRealized = (Bool)pWin->realized;
|
Bool wasRealized = (Bool)pWin->realized;
|
||||||
Bool wasViewable = (Bool)pWin->viewable;
|
Bool wasViewable = (Bool)pWin->viewable;
|
||||||
|
@ -3088,9 +3088,9 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
void
|
void
|
||||||
UnmapSubwindows(register WindowPtr pWin)
|
UnmapSubwindows(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
register WindowPtr pChild, pHead;
|
WindowPtr pChild, pHead;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
Bool wasRealized = (Bool)pWin->realized;
|
Bool wasRealized = (Bool)pWin->realized;
|
||||||
Bool wasViewable = (Bool)pWin->viewable;
|
Bool wasViewable = (Bool)pWin->viewable;
|
||||||
|
@ -3179,10 +3179,10 @@ UnmapSubwindows(register WindowPtr pWin)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
HandleSaveSet(register ClientPtr client)
|
HandleSaveSet(ClientPtr client)
|
||||||
{
|
{
|
||||||
register WindowPtr pParent, pWin;
|
WindowPtr pParent, pWin;
|
||||||
register int j;
|
int j;
|
||||||
|
|
||||||
for (j=0; j<client->numSaved; j++)
|
for (j=0; j<client->numSaved; j++)
|
||||||
{
|
{
|
||||||
|
@ -3225,7 +3225,7 @@ HandleSaveSet(register ClientPtr client)
|
||||||
* \param box "return" value
|
* \param box "return" value
|
||||||
*/
|
*/
|
||||||
Bool
|
Bool
|
||||||
VisibleBoundingBoxFromPoint(register WindowPtr pWin, int x, int y, BoxPtr box)
|
VisibleBoundingBoxFromPoint(WindowPtr pWin, int x, int y, BoxPtr box)
|
||||||
{
|
{
|
||||||
if (!pWin->realized)
|
if (!pWin->realized)
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
|
@ -3239,7 +3239,7 @@ VisibleBoundingBoxFromPoint(register WindowPtr pWin, int x, int y, BoxPtr box)
|
||||||
* \param x,y in root
|
* \param x,y in root
|
||||||
*/
|
*/
|
||||||
Bool
|
Bool
|
||||||
PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
|
PointInWindowIsVisible(WindowPtr pWin, int x, int y)
|
||||||
{
|
{
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
|
@ -3258,9 +3258,9 @@ PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
|
||||||
|
|
||||||
|
|
||||||
_X_EXPORT RegionPtr
|
_X_EXPORT RegionPtr
|
||||||
NotClippedByChildren(register WindowPtr pWin)
|
NotClippedByChildren(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
RegionPtr pReg;
|
RegionPtr pReg;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
@ -3606,7 +3606,7 @@ TileScreenSaver(int i, int kind)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_X_EXPORT WindowPtr
|
_X_EXPORT WindowPtr
|
||||||
FindWindowWithOptional (register WindowPtr w)
|
FindWindowWithOptional (WindowPtr w)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
w = w->parent;
|
w = w->parent;
|
||||||
|
@ -3623,10 +3623,10 @@ FindWindowWithOptional (register WindowPtr w)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
CheckWindowOptionalNeed (register WindowPtr w)
|
CheckWindowOptionalNeed (WindowPtr w)
|
||||||
{
|
{
|
||||||
register WindowOptPtr optional;
|
WindowOptPtr optional;
|
||||||
register WindowOptPtr parentOptional;
|
WindowOptPtr parentOptional;
|
||||||
|
|
||||||
if (!w->parent)
|
if (!w->parent)
|
||||||
return;
|
return;
|
||||||
|
@ -3691,10 +3691,10 @@ CheckWindowOptionalNeed (register WindowPtr w)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
MakeWindowOptional (register WindowPtr pWin)
|
MakeWindowOptional (WindowPtr pWin)
|
||||||
{
|
{
|
||||||
register WindowOptPtr optional;
|
WindowOptPtr optional;
|
||||||
register WindowOptPtr parentOptional;
|
WindowOptPtr parentOptional;
|
||||||
|
|
||||||
if (pWin->optional)
|
if (pWin->optional)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -3739,7 +3739,7 @@ MakeWindowOptional (register WindowPtr pWin)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DisposeWindowOptional (register WindowPtr pWin)
|
DisposeWindowOptional (WindowPtr pWin)
|
||||||
{
|
{
|
||||||
if (!pWin->optional)
|
if (!pWin->optional)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -43,11 +43,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
|
||||||
if (paddedWidth / 4 > 32767 || height > 32767)
|
if (paddedWidth / 4 > 32767 || height > 32767)
|
||||||
return NullPixmap;
|
return NullPixmap;
|
||||||
datasize = height * paddedWidth;
|
datasize = height * paddedWidth;
|
||||||
#ifdef PIXPRIV
|
|
||||||
base = pScreen->totalPixmapSize;
|
base = pScreen->totalPixmapSize;
|
||||||
#else
|
|
||||||
base = sizeof (PixmapRec);
|
|
||||||
#endif
|
|
||||||
adjust = 0;
|
adjust = 0;
|
||||||
if (base & 7)
|
if (base & 7)
|
||||||
adjust = 8 - (base & 7);
|
adjust = 8 - (base & 7);
|
||||||
|
|
|
@ -17,7 +17,6 @@ SUBDIRS = \
|
||||||
utils \
|
utils \
|
||||||
.
|
.
|
||||||
|
|
||||||
|
|
||||||
darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
|
darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
|
||||||
|
|
||||||
libdarwinShared_a_SOURCES = darwin.c \
|
libdarwinShared_a_SOURCES = darwin.c \
|
||||||
|
@ -62,25 +61,11 @@ XDarwin_LDADD = \
|
||||||
$(top_builddir)/dix/dixfonts.lo \
|
$(top_builddir)/dix/dixfonts.lo \
|
||||||
$(top_builddir)/dix/libdix.la \
|
$(top_builddir)/dix/libdix.la \
|
||||||
$(top_builddir)/config/libconfig.a \
|
$(top_builddir)/config/libconfig.a \
|
||||||
$(top_builddir)/os/libos.la \
|
|
||||||
./libdarwinShared.a \
|
./libdarwinShared.a \
|
||||||
./iokit/libiokit.a \
|
./iokit/libiokit.a \
|
||||||
$(top_builddir)/dix/libxpstubs.la \
|
|
||||||
$(top_builddir)/miext/shadow/libshadow.la \
|
$(top_builddir)/miext/shadow/libshadow.la \
|
||||||
$(top_builddir)/fb/libfb.la \
|
|
||||||
$(top_builddir)/composite/libcomposite.la \
|
|
||||||
$(top_builddir)/damageext/libdamageext.la \
|
|
||||||
$(top_builddir)/miext/damage/libdamage.la \
|
|
||||||
$(top_builddir)/xfixes/libxfixes.la \
|
|
||||||
$(top_builddir)/miext/cw/libcw.la \
|
$(top_builddir)/miext/cw/libcw.la \
|
||||||
$(top_builddir)/Xext/libXext.la \
|
$(DARWIN_LIBS) \
|
||||||
$(top_builddir)/xkb/libxkb.la \
|
|
||||||
$(top_builddir)/xkb/libxkbstubs.la \
|
|
||||||
$(top_builddir)/Xi/libXi.la \
|
|
||||||
$(top_builddir)/dbe/libdbe.la \
|
|
||||||
$(top_builddir)/record/librecord.la \
|
|
||||||
$(top_builddir)/XTrap/libxtrap.la \
|
|
||||||
$(XGLX_LIBS) \
|
|
||||||
$(top_builddir)/miext/rootless/librootless.la \
|
$(top_builddir)/miext/rootless/librootless.la \
|
||||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||||
|
@ -91,23 +76,10 @@ Xquartz_LDADD = \
|
||||||
$(top_builddir)/dix/dixfonts.lo \
|
$(top_builddir)/dix/dixfonts.lo \
|
||||||
$(top_builddir)/dix/libdix.la \
|
$(top_builddir)/dix/libdix.la \
|
||||||
$(top_builddir)/config/libconfig.a \
|
$(top_builddir)/config/libconfig.a \
|
||||||
$(top_builddir)/os/libos.la \
|
|
||||||
./libdarwinShared.a \
|
./libdarwinShared.a \
|
||||||
$(top_builddir)/dix/libxpstubs.la \
|
|
||||||
$(top_builddir)/miext/shadow/libshadow.la \
|
$(top_builddir)/miext/shadow/libshadow.la \
|
||||||
$(top_builddir)/fb/libfb.la \
|
|
||||||
$(top_builddir)/composite/libcomposite.la \
|
|
||||||
$(top_builddir)/damageext/libdamageext.la \
|
|
||||||
$(top_builddir)/miext/damage/libdamage.la \
|
|
||||||
$(top_builddir)/xfixes/libxfixes.la \
|
|
||||||
$(top_builddir)/miext/cw/libcw.la \
|
$(top_builddir)/miext/cw/libcw.la \
|
||||||
$(top_builddir)/Xext/libXext.la \
|
$(DARWIN_LIBS) \
|
||||||
$(top_builddir)/xkb/libxkb.la \
|
|
||||||
$(top_builddir)/xkb/libxkbstubs.la \
|
|
||||||
$(top_builddir)/Xi/libXi.la \
|
|
||||||
$(top_builddir)/dbe/libdbe.la \
|
|
||||||
$(top_builddir)/record/librecord.la \
|
|
||||||
$(top_builddir)/XTrap/libxtrap.la \
|
|
||||||
$(top_builddir)/miext/rootless/librootless.la \
|
$(top_builddir)/miext/rootless/librootless.la \
|
||||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||||
|
@ -140,7 +112,7 @@ macos_PROGRAMS = XDarwinApp
|
||||||
macos_SCRIPTS = x11app
|
macos_SCRIPTS = x11app
|
||||||
|
|
||||||
x11app:
|
x11app:
|
||||||
cd apple && xcodebuild
|
cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"
|
||||||
|
|
||||||
XDarwinApp_SOURCES = \
|
XDarwinApp_SOURCES = \
|
||||||
$(top_srcdir)/fb/fbcmap.c \
|
$(top_srcdir)/fb/fbcmap.c \
|
||||||
|
@ -155,28 +127,14 @@ XDarwinApp_LDADD = \
|
||||||
./quartz/XApplication.o \
|
./quartz/XApplication.o \
|
||||||
./libdarwinShared.a \
|
./libdarwinShared.a \
|
||||||
./quartz/libXQuartz.a \
|
./quartz/libXQuartz.a \
|
||||||
$(top_builddir)/dix/libxpstubs.la \
|
|
||||||
$(top_builddir)/miext/shadow/libshadow.la \
|
$(top_builddir)/miext/shadow/libshadow.la \
|
||||||
$(top_builddir)/fb/libfb.la \
|
|
||||||
$(top_builddir)/composite/libcomposite.la \
|
|
||||||
$(top_builddir)/damageext/libdamageext.la \
|
|
||||||
$(top_builddir)/miext/damage/libdamage.la \
|
|
||||||
$(top_builddir)/xfixes/libxfixes.la \
|
|
||||||
$(top_builddir)/miext/cw/libcw.la \
|
$(top_builddir)/miext/cw/libcw.la \
|
||||||
$(top_builddir)/Xext/libXext.la \
|
$(DARWIN_LIBS) \
|
||||||
$(top_builddir)/xkb/libxkb.la \
|
|
||||||
$(top_builddir)/xkb/libxkbstubs.la \
|
|
||||||
$(top_builddir)/Xi/libXi.la \
|
|
||||||
$(top_builddir)/dbe/libdbe.la \
|
|
||||||
$(top_builddir)/record/librecord.la \
|
|
||||||
$(top_builddir)/XTrap/libxtrap.la \
|
|
||||||
$(XGLX_LIBS) \
|
|
||||||
$(top_builddir)/miext/rootless/librootless.la \
|
$(top_builddir)/miext/rootless/librootless.la \
|
||||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||||
@XORG_LIBS@ \
|
@XORG_LIBS@ \
|
||||||
$(XSERVER_LIBS) \
|
$(XSERVER_LIBS)
|
||||||
$(top_builddir)/fb/libfb.la
|
|
||||||
|
|
||||||
XDarwinApp_LDFLAGS = \
|
XDarwinApp_LDFLAGS = \
|
||||||
-XCClinker -Objc \
|
-XCClinker -Objc \
|
||||||
|
|
|
@ -22,20 +22,14 @@ The server builds 4 targets:
|
||||||
Known issues:
|
Known issues:
|
||||||
|
|
||||||
* AGL and CGL support for 3D indirect acceleration does not work;
|
* AGL and CGL support for 3D indirect acceleration does not work;
|
||||||
indirect.c needs to be rewritten.
|
indirect.c has been rewritten, but not yet integrated into this source tree.
|
||||||
|
|
||||||
* Fullscreen mode does not work; I don't know why.
|
* Fullscreen mode does not work; I don't know why.
|
||||||
|
|
||||||
* The keyboard and mouse do not work at all; they worked in X11R7.1,
|
|
||||||
and I believe that they were broken by the events changes in dix/.
|
|
||||||
|
|
||||||
* Some features in X11.app are not yet implemented; these are marked
|
* Some features in X11.app are not yet implemented; these are marked
|
||||||
with #ifdef DARWIN_DDX_MISSING in the code.
|
with #ifdef DARWIN_DDX_MISSING in the code.
|
||||||
|
|
||||||
* The build system code could probably be cleaned up slightly.
|
* The build system code could probably be cleaned up slightly.
|
||||||
|
|
||||||
* Most testing of this code has occurred under 10.5, but it should
|
|
||||||
also work under 10.4.
|
|
||||||
|
|
||||||
Any patches or code contributions would be most welcome and may be
|
Any patches or code contributions would be most welcome and may be
|
||||||
sent to me at bbyer@apple.com.
|
sent to me at bbyer@apple.com.
|
||||||
|
|
|
@ -224,15 +224,12 @@
|
||||||
DSTROOT = "$(DSTROOT)";
|
DSTROOT = "$(DSTROOT)";
|
||||||
FRAMEWORK_SEARCH_PATHS = "";
|
FRAMEWORK_SEARCH_PATHS = "";
|
||||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||||
HEADER_SEARCH_PATHS = /usr/X11/include;
|
HEADER_SEARCH_PATHS = "";
|
||||||
INFOPLIST_FILE = Info.plist;
|
INFOPLIST_FILE = Info.plist;
|
||||||
INSTALL_PATH = $DSTROOT/Applications/Utilties;
|
INSTALL_PATH = $DSTROOT/Applications/Utilties;
|
||||||
LIBRARY_SEARCH_PATHS = /usr/X11/lib;
|
LIBRARY_SEARCH_PATHS = "";
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "$(CFLAGS)";
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = "$(LDFLAGS)";
|
||||||
"-lXau",
|
|
||||||
"-lX11",
|
|
||||||
);
|
|
||||||
OTHER_REZFLAGS = "";
|
OTHER_REZFLAGS = "";
|
||||||
PRODUCT_NAME = X11;
|
PRODUCT_NAME = X11;
|
||||||
SECTORDER_FLAGS = "";
|
SECTORDER_FLAGS = "";
|
||||||
|
@ -252,15 +249,12 @@
|
||||||
DSTROOT = "$(DSTROOT)";
|
DSTROOT = "$(DSTROOT)";
|
||||||
FRAMEWORK_SEARCH_PATHS = "";
|
FRAMEWORK_SEARCH_PATHS = "";
|
||||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||||
HEADER_SEARCH_PATHS = /usr/X11/include;
|
HEADER_SEARCH_PATHS = "";
|
||||||
INFOPLIST_FILE = Info.plist;
|
INFOPLIST_FILE = Info.plist;
|
||||||
INSTALL_PATH = $DSTROOT/Applications/Utilties;
|
INSTALL_PATH = $DSTROOT/Applications/Utilties;
|
||||||
LIBRARY_SEARCH_PATHS = /usr/X11/lib;
|
LIBRARY_SEARCH_PATHS = "";
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "$(CFLAGS)";
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = "$(LDFLAGS)";
|
||||||
"-lXau",
|
|
||||||
"-lX11",
|
|
||||||
);
|
|
||||||
OTHER_REZFLAGS = "";
|
OTHER_REZFLAGS = "";
|
||||||
PRODUCT_NAME = X11;
|
PRODUCT_NAME = X11;
|
||||||
SECTORDER_FLAGS = "";
|
SECTORDER_FLAGS = "";
|
||||||
|
@ -279,15 +273,12 @@
|
||||||
DSTROOT = "$(DSTROOT)";
|
DSTROOT = "$(DSTROOT)";
|
||||||
FRAMEWORK_SEARCH_PATHS = "";
|
FRAMEWORK_SEARCH_PATHS = "";
|
||||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||||
HEADER_SEARCH_PATHS = /usr/X11/include;
|
HEADER_SEARCH_PATHS = "";
|
||||||
INFOPLIST_FILE = Info.plist;
|
INFOPLIST_FILE = Info.plist;
|
||||||
INSTALL_PATH = $DSTROOT/Applications/Utilties;
|
INSTALL_PATH = $DSTROOT/Applications/Utilties;
|
||||||
LIBRARY_SEARCH_PATHS = /usr/X11/lib;
|
LIBRARY_SEARCH_PATHS = "";
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "$(CFLAGS)";
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = "$(LDFLAGS)";
|
||||||
"-lXau",
|
|
||||||
"-lX11",
|
|
||||||
);
|
|
||||||
OTHER_REZFLAGS = "";
|
OTHER_REZFLAGS = "";
|
||||||
PRODUCT_NAME = X11;
|
PRODUCT_NAME = X11;
|
||||||
SECTORDER_FLAGS = "";
|
SECTORDER_FLAGS = "";
|
||||||
|
|
|
@ -56,7 +56,7 @@ extern int darwinFakeButtons, input_check_flag;
|
||||||
// extern Bool enable_stereo;
|
// extern Bool enable_stereo;
|
||||||
Bool enable_stereo; //<-- this needs to go back to being an extern once glxCGL is fixed
|
Bool enable_stereo; //<-- this needs to go back to being an extern once glxCGL is fixed
|
||||||
|
|
||||||
static xEvent *quartzEvents;
|
extern xEvent *darwinEvents;
|
||||||
|
|
||||||
X11Application *X11App;
|
X11Application *X11App;
|
||||||
|
|
||||||
|
@ -805,7 +805,6 @@ void X11ApplicationMain (int argc, const char *argv[],
|
||||||
pool = [[NSAutoreleasePool alloc] init];
|
pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
X11App = (X11Application *) [X11Application sharedApplication];
|
X11App = (X11Application *) [X11Application sharedApplication];
|
||||||
quartzEvents = (xEvent *)malloc(sizeof(xEvent) * GetMaximumEventsNum());
|
|
||||||
|
|
||||||
init_ports ();
|
init_ports ();
|
||||||
|
|
||||||
|
@ -856,21 +855,16 @@ convert_flags (unsigned int nsflags) {
|
||||||
return xflags;
|
return xflags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// This code should probably be merged with that in XDarwin's XServer.m - BB
|
// This code should probably be merged with that in XDarwin's XServer.m - BB
|
||||||
static void send_nsevent (NSEventType type, NSEvent *e) {
|
static void send_nsevent (NSEventType type, NSEvent *e) {
|
||||||
static unsigned int button_state = 0;
|
// static unsigned int button_state = 0;
|
||||||
NSRect screen;
|
NSRect screen;
|
||||||
NSPoint location;
|
NSPoint location;
|
||||||
NSWindow *window;
|
NSWindow *window;
|
||||||
int pointer_x, pointer_y, ev_button, ev_type;
|
int pointer_x, pointer_y, ev_button, ev_type;
|
||||||
int num_events=0, i=0, state;
|
// int num_events=0, i=0, state;
|
||||||
int valuators[2];
|
|
||||||
float count;
|
|
||||||
xEvent xe;
|
xEvent xe;
|
||||||
char nullbyte=0;
|
|
||||||
|
|
||||||
bzero(&xe, sizeof(xe));
|
|
||||||
input_check_flag++;
|
|
||||||
|
|
||||||
/* convert location to global top-left coordinates */
|
/* convert location to global top-left coordinates */
|
||||||
location = [e locationInWindow];
|
location = [e locationInWindow];
|
||||||
|
@ -887,11 +881,8 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
|
||||||
pointer_y = (screen.origin.y + screen.size.height) - location.y;
|
pointer_y = (screen.origin.y + screen.size.height) - location.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrorF("send_nsevent: type=%d pointer=(%d,%d)\n", type, pointer_x, pointer_y);
|
pointer_y -= aquaMenuBarHeight;
|
||||||
|
// state = convert_flags ([e modifierFlags]);
|
||||||
valuators[0] = pointer_x;
|
|
||||||
valuators[1] = pointer_y - aquaMenuBarHeight;
|
|
||||||
state = convert_flags ([e modifierFlags]);
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case NSLeftMouseDown: ev_button=1; ev_type=ButtonPress; goto handle_mouse;
|
case NSLeftMouseDown: ev_button=1; ev_type=ButtonPress; goto handle_mouse;
|
||||||
|
@ -906,50 +897,30 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
|
||||||
case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
|
case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
|
||||||
handle_mouse:
|
handle_mouse:
|
||||||
|
|
||||||
|
/* I'm not sure the below code is necessary or useful (-bb)
|
||||||
if(ev_type==ButtonPress) {
|
if(ev_type==ButtonPress) {
|
||||||
if (!quartzProcs->IsX11Window([e window], [e windowNumber])) {
|
if (!quartzProcs->IsX11Window([e window], [e windowNumber])) {
|
||||||
fprintf(stderr, "Dropping event because it's not a window\n");
|
fprintf(stderr, "Dropping event because it's not a window\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
button_state |= (1 << ev_button);
|
button_state |= (1 << ev_button);
|
||||||
|
DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y);
|
||||||
} else if (ev_type==ButtonRelease && (button_state & (1 << ev_button)) == 0) break;
|
} else if (ev_type==ButtonRelease && (button_state & (1 << ev_button)) == 0) break;
|
||||||
|
*/
|
||||||
num_events = GetPointerEvents(quartzEvents, darwinPointer, ev_type, ev_button,
|
DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y);
|
||||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
|
||||||
|
|
||||||
for(i=0; i<num_events; i++)
|
|
||||||
mieqEnqueue (darwinPointer,&quartzEvents[i]);
|
|
||||||
break;
|
break;
|
||||||
case NSScrollWheel:
|
case NSScrollWheel:
|
||||||
count = [e deltaY];
|
DarwinSendScrollEvents([e deltaY], pointer_x, pointer_y);
|
||||||
ev_button = count > 0.0f ? 4 : 5;
|
|
||||||
for (count = fabs(count); count > 0.0; count = count - 1.0f) {
|
|
||||||
num_events = GetPointerEvents(quartzEvents, darwinPointer, ButtonPress, ev_button,
|
|
||||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
|
||||||
for(i=0; i<num_events; i++)
|
|
||||||
mieqEnqueue(darwinPointer,&quartzEvents[i]);
|
|
||||||
num_events = GetPointerEvents(quartzEvents, darwinPointer, ButtonRelease, ev_button,
|
|
||||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
|
||||||
for(i=0; i<num_events; i++)
|
|
||||||
mieqEnqueue(darwinPointer,&quartzEvents[i]);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSKeyDown: // do we need to translate these keyCodes?
|
case NSKeyDown: // do we need to translate these keyCodes?
|
||||||
case NSKeyUp:
|
case NSKeyUp:
|
||||||
num_events = GetKeyboardEvents(quartzEvents, darwinKeyboard,
|
DarwinSendKeyboardEvents((type == NSKeyDown)?KeyPress:KeyRelease, [e keyCode]);
|
||||||
(type == NSKeyDown)?KeyPress:KeyRelease, [e keyCode]);
|
|
||||||
for(i=0; i<num_events; i++)
|
|
||||||
mieqEnqueue(darwinKeyboard,&quartzEvents[i]);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSFlagsChanged:
|
case NSFlagsChanged:
|
||||||
xe.u.u.type = kXDarwinUpdateModifiers;
|
DarwinUpdateModKeys([e modifierFlags]);
|
||||||
xe.u.clientMessage.u.l.longs0 = [e modifierFlags];
|
|
||||||
DarwinEQEnqueue (&xe);
|
|
||||||
break;
|
break;
|
||||||
default: break; /* for gcc */
|
default: break; /* for gcc */
|
||||||
}
|
}
|
||||||
// <daniels> bushing: oh, i ... er ... christ.
|
|
||||||
write(darwinEventWriteFD, &nullbyte, 1);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -601,10 +601,10 @@ display_exists_p (int number)
|
||||||
int idisplay, iscreen;
|
int idisplay, iscreen;
|
||||||
char *conn_auth_name, *conn_auth_data;
|
char *conn_auth_name, *conn_auth_data;
|
||||||
int conn_auth_namelen, conn_auth_datalen;
|
int conn_auth_namelen, conn_auth_datalen;
|
||||||
|
#ifdef USE_XTRANS_INTERNALS
|
||||||
extern void *_X11TransConnectDisplay ();
|
extern void *_X11TransConnectDisplay ();
|
||||||
extern void _XDisconnectDisplay ();
|
extern void _XDisconnectDisplay ();
|
||||||
|
#endif
|
||||||
/* Since connecting to the display waits for a few seconds if the
|
/* Since connecting to the display waits for a few seconds if the
|
||||||
display doesn't exist, check for trivial non-existence - if the
|
display doesn't exist, check for trivial non-existence - if the
|
||||||
socket in /tmp exists or not.. (note: if the socket exists, the
|
socket in /tmp exists or not.. (note: if the socket exists, the
|
||||||
|
@ -613,7 +613,7 @@ display_exists_p (int number)
|
||||||
sprintf (buf, "/tmp/.X11-unix/X%d", number);
|
sprintf (buf, "/tmp/.X11-unix/X%d", number);
|
||||||
if (access (buf, F_OK) != 0)
|
if (access (buf, F_OK) != 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
#ifdef USE_XTRANS_INTERNALS
|
||||||
/* This is a private function that we shouldn't really be calling,
|
/* This is a private function that we shouldn't really be calling,
|
||||||
but it's the best way to see if the server exists (without
|
but it's the best way to see if the server exists (without
|
||||||
needing to hold the necessary authentication to use it) */
|
needing to hold the necessary authentication to use it) */
|
||||||
|
@ -626,6 +626,7 @@ display_exists_p (int number)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
_XDisconnectDisplay (conn);
|
_XDisconnectDisplay (conn);
|
||||||
|
#endif
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,10 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
|
||||||
void DarwinEQEnqueue(const xEvent *e);
|
void DarwinEQEnqueue(const xEvent *e);
|
||||||
void DarwinEQPointerPost(xEvent *e);
|
void DarwinEQPointerPost(xEvent *e);
|
||||||
void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
|
void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
|
||||||
|
void DarwinPokeEQ(void);
|
||||||
|
void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y);
|
||||||
|
void DarwinSendKeyboardEvents(int ev_type, int keycode);
|
||||||
|
void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y);
|
||||||
|
|
||||||
// From darwinKeyboard.c
|
// From darwinKeyboard.c
|
||||||
int DarwinModifierNXKeyToNXKeycode(int key, int side);
|
int DarwinModifierNXKeyToNXKeycode(int key, int side);
|
||||||
|
|
|
@ -63,6 +63,8 @@ typedef struct _Event {
|
||||||
|
|
||||||
int input_check_zero, input_check_flag;
|
int input_check_zero, input_check_flag;
|
||||||
|
|
||||||
|
static int old_flags = 0; // last known modifier state
|
||||||
|
|
||||||
typedef struct _EventQueue {
|
typedef struct _EventQueue {
|
||||||
HWEventQueueType head, tail; /* long for SetInputCheck */
|
HWEventQueueType head, tail; /* long for SetInputCheck */
|
||||||
CARD32 lastEventTime; /* to avoid time running backwards */
|
CARD32 lastEventTime; /* to avoid time running backwards */
|
||||||
|
@ -74,24 +76,22 @@ typedef struct _EventQueue {
|
||||||
} EventQueueRec, *EventQueuePtr;
|
} EventQueueRec, *EventQueuePtr;
|
||||||
|
|
||||||
static EventQueueRec darwinEventQueue;
|
static EventQueueRec darwinEventQueue;
|
||||||
|
xEvent *darwinEvents;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DarwinPressModifierMask
|
* DarwinPressModifierMask
|
||||||
* Press or release the given modifier key, specified by its mask.
|
* Press or release the given modifier key, specified by its mask.
|
||||||
*/
|
*/
|
||||||
static void DarwinPressModifierMask(
|
static void DarwinPressModifierMask(
|
||||||
xEvent *xe, // must already have type, time and mouse location
|
int pressed,
|
||||||
int mask) // one of NX_*MASK constants
|
int mask) // one of NX_*MASK constants
|
||||||
{
|
{
|
||||||
int key = DarwinModifierNXMaskToNXKey(mask);
|
int key = DarwinModifierNXMaskToNXKey(mask);
|
||||||
|
|
||||||
if (key != -1) {
|
if (key != -1) {
|
||||||
int keycode = DarwinModifierNXKeyToNXKeycode(key, 0);
|
int keycode = DarwinModifierNXKeyToNXKeycode(key, 0);
|
||||||
if (keycode != 0) {
|
if (keycode != 0)
|
||||||
xe->u.u.detail = keycode + MIN_KEYCODE;
|
DarwinSendKeyboardEvents(pressed, keycode);
|
||||||
(*darwinEventQueue.pKbd->processInputProc)(xe,
|
|
||||||
(DeviceIntPtr)darwinEventQueue.pKbd, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,28 +124,26 @@ static void DarwinPressModifierMask(
|
||||||
* Send events to update the modifier state.
|
* Send events to update the modifier state.
|
||||||
*/
|
*/
|
||||||
static void DarwinUpdateModifiers(
|
static void DarwinUpdateModifiers(
|
||||||
xEvent *xe, // event template with time and mouse position set
|
|
||||||
int pressed, // KeyPress or KeyRelease
|
int pressed, // KeyPress or KeyRelease
|
||||||
int flags ) // modifier flags that have changed
|
int flags ) // modifier flags that have changed
|
||||||
{
|
{
|
||||||
xe->u.u.type = pressed;
|
|
||||||
if (flags & NX_ALPHASHIFTMASK) {
|
if (flags & NX_ALPHASHIFTMASK) {
|
||||||
DarwinPressModifierMask(xe, NX_ALPHASHIFTMASK);
|
DarwinPressModifierMask(pressed, NX_ALPHASHIFTMASK);
|
||||||
}
|
}
|
||||||
if (flags & NX_COMMANDMASK) {
|
if (flags & NX_COMMANDMASK) {
|
||||||
DarwinPressModifierMask(xe, COMMAND_MASK(flags));
|
DarwinPressModifierMask(pressed, COMMAND_MASK(flags));
|
||||||
}
|
}
|
||||||
if (flags & NX_CONTROLMASK) {
|
if (flags & NX_CONTROLMASK) {
|
||||||
DarwinPressModifierMask(xe, CONTROL_MASK(flags));
|
DarwinPressModifierMask(pressed, CONTROL_MASK(flags));
|
||||||
}
|
}
|
||||||
if (flags & NX_ALTERNATEMASK) {
|
if (flags & NX_ALTERNATEMASK) {
|
||||||
DarwinPressModifierMask(xe, ALTERNATE_MASK(flags));
|
DarwinPressModifierMask(pressed, ALTERNATE_MASK(flags));
|
||||||
}
|
}
|
||||||
if (flags & NX_SHIFTMASK) {
|
if (flags & NX_SHIFTMASK) {
|
||||||
DarwinPressModifierMask(xe, SHIFT_MASK(flags));
|
DarwinPressModifierMask(pressed, SHIFT_MASK(flags));
|
||||||
}
|
}
|
||||||
if (flags & NX_SECONDARYFNMASK) {
|
if (flags & NX_SECONDARYFNMASK) {
|
||||||
DarwinPressModifierMask(xe, NX_SECONDARYFNMASK);
|
DarwinPressModifierMask(pressed, NX_SECONDARYFNMASK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,23 +160,25 @@ static void DarwinUpdateModifiers(
|
||||||
* simulate a button 2 press instead of Command-button 2.
|
* simulate a button 2 press instead of Command-button 2.
|
||||||
*/
|
*/
|
||||||
static void DarwinSimulateMouseClick(
|
static void DarwinSimulateMouseClick(
|
||||||
xEvent *xe, // event template with time and
|
int pointer_x,
|
||||||
// mouse position filled in
|
int pointer_y,
|
||||||
int whichButton, // mouse button to be pressed
|
int whichButton, // mouse button to be pressed
|
||||||
int modifierMask) // modifiers used for the fake click
|
int modifierMask) // modifiers used for the fake click
|
||||||
{
|
{
|
||||||
// first fool X into forgetting about the keys
|
// first fool X into forgetting about the keys
|
||||||
DarwinUpdateModifiers(xe, KeyRelease, modifierMask);
|
DarwinUpdateModifiers(KeyRelease, modifierMask);
|
||||||
|
|
||||||
// push the mouse button
|
// push the mouse button
|
||||||
xe->u.u.type = ButtonPress;
|
DarwinSendPointerEvents(ButtonPress, whichButton, pointer_x, pointer_y);
|
||||||
xe->u.u.detail = whichButton;
|
DarwinSendPointerEvents(ButtonRelease, whichButton, pointer_x, pointer_y);
|
||||||
(*darwinEventQueue.pPtr->processInputProc)
|
|
||||||
(xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
// restore old modifiers
|
||||||
|
DarwinUpdateModifiers(KeyPress, modifierMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
|
Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
|
||||||
|
darwinEvents = (xEvent *)malloc(sizeof(xEvent) * GetMaximumEventsNum());
|
||||||
mieqInit();
|
mieqInit();
|
||||||
darwinEventQueue.head = darwinEventQueue.tail = 0;
|
darwinEventQueue.head = darwinEventQueue.tail = 0;
|
||||||
darwinEventQueue.lastEventTime = GetTimeInMillis ();
|
darwinEventQueue.lastEventTime = GetTimeInMillis ();
|
||||||
|
@ -232,7 +232,7 @@ void DarwinEQEnqueue(const xEvent *e) {
|
||||||
darwinEventQueue.tail = newtail;
|
darwinEventQueue.tail = newtail;
|
||||||
|
|
||||||
// Signal there is an event ready to handle
|
// Signal there is an event ready to handle
|
||||||
write(darwinEventWriteFD, &byte, 1);
|
DarwinPokeEQ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -263,11 +263,9 @@ void ProcessInputEvents(void) {
|
||||||
xEvent xe;
|
xEvent xe;
|
||||||
static int old_flags = 0; // last known modifier state
|
static int old_flags = 0; // last known modifier state
|
||||||
// button number and modifier mask of currently pressed fake button
|
// button number and modifier mask of currently pressed fake button
|
||||||
static int darwinFakeMouseButtonDown = 0;
|
|
||||||
static int darwinFakeMouseButtonMask = 0;
|
|
||||||
input_check_flag=0;
|
input_check_flag=0;
|
||||||
|
|
||||||
ErrorF("calling mieqProcessInputEvents\n");
|
// ErrorF("calling mieqProcessInputEvents\n");
|
||||||
mieqProcessInputEvents();
|
mieqProcessInputEvents();
|
||||||
|
|
||||||
// Empty the signaling pipe
|
// Empty the signaling pipe
|
||||||
|
@ -290,12 +288,12 @@ void ProcessInputEvents(void) {
|
||||||
xe.u.keyButtonPointer.rootY -= darwinMainScreenY +
|
xe.u.keyButtonPointer.rootY -= darwinMainScreenY +
|
||||||
dixScreenOrigins[miPointerCurrentScreen()->myNum].y;
|
dixScreenOrigins[miPointerCurrentScreen()->myNum].y;
|
||||||
|
|
||||||
ErrorF("old rootX = (%d,%d) darwinMainScreen = (%d,%d) dixScreenOrigins[%d]=(%d,%d)\n",
|
/* ErrorF("old rootX = (%d,%d) darwinMainScreen = (%d,%d) dixScreenOrigins[%d]=(%d,%d)\n",
|
||||||
xe.u.keyButtonPointer.rootX, xe.u.keyButtonPointer.rootY,
|
xe.u.keyButtonPointer.rootX, xe.u.keyButtonPointer.rootY,
|
||||||
darwinMainScreenX, darwinMainScreenY,
|
darwinMainScreenX, darwinMainScreenY,
|
||||||
miPointerCurrentScreen()->myNum,
|
miPointerCurrentScreen()->myNum,
|
||||||
dixScreenOrigins[miPointerCurrentScreen()->myNum].x,
|
dixScreenOrigins[miPointerCurrentScreen()->myNum].x,
|
||||||
dixScreenOrigins[miPointerCurrentScreen()->myNum].y);
|
dixScreenOrigins[miPointerCurrentScreen()->myNum].y); */
|
||||||
|
|
||||||
//Assumption - screen switching can only occur on motion events
|
//Assumption - screen switching can only occur on motion events
|
||||||
|
|
||||||
|
@ -316,155 +314,35 @@ void ProcessInputEvents(void) {
|
||||||
darwinEventQueue.head = 0;
|
darwinEventQueue.head = 0;
|
||||||
else
|
else
|
||||||
++darwinEventQueue.head;
|
++darwinEventQueue.head;
|
||||||
switch (xe.u.u.type)
|
switch (xe.u.u.type) {
|
||||||
{
|
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
if (old_flags == 0
|
|
||||||
&& darwinSyncKeymap && darwinKeymapFile == NULL)
|
|
||||||
{
|
|
||||||
/* See if keymap has changed. */
|
|
||||||
|
|
||||||
static unsigned int last_seed;
|
|
||||||
unsigned int this_seed;
|
|
||||||
|
|
||||||
this_seed = DarwinModeSystemKeymapSeed();
|
|
||||||
if (this_seed != last_seed)
|
|
||||||
{
|
|
||||||
last_seed = this_seed;
|
|
||||||
DarwinKeyboardReload(darwinKeyboard);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* fall through */
|
|
||||||
|
|
||||||
case KeyRelease:
|
case KeyRelease:
|
||||||
xe.u.u.detail += MIN_KEYCODE;
|
ErrorF("Unexpected Keyboard event in DarwinProcessInputEvents\n");
|
||||||
(*darwinEventQueue.pKbd->processInputProc)
|
|
||||||
(&xe, (DeviceIntPtr)darwinEventQueue.pKbd, 1);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
miPointerAbsoluteCursor(xe.u.keyButtonPointer.rootX,
|
ErrorF("Unexpected ButtonPress event in DarwinProcessInputEvents\n");
|
||||||
xe.u.keyButtonPointer.rootY,
|
|
||||||
xe.u.keyButtonPointer.time);
|
|
||||||
if (darwinFakeButtons && xe.u.u.detail == 1) {
|
|
||||||
// Mimic multi-button mouse with modifier-clicks
|
|
||||||
// If both sets of modifiers are pressed,
|
|
||||||
// button 2 is clicked.
|
|
||||||
if ((old_flags & darwinFakeMouse2Mask) ==
|
|
||||||
darwinFakeMouse2Mask)
|
|
||||||
{
|
|
||||||
DarwinSimulateMouseClick(&xe, 2, darwinFakeMouse2Mask);
|
|
||||||
darwinFakeMouseButtonDown = 2;
|
|
||||||
darwinFakeMouseButtonMask = darwinFakeMouse2Mask;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if ((old_flags & darwinFakeMouse3Mask) ==
|
|
||||||
darwinFakeMouse3Mask)
|
|
||||||
{
|
|
||||||
DarwinSimulateMouseClick(&xe, 3, darwinFakeMouse3Mask);
|
|
||||||
darwinFakeMouseButtonDown = 3;
|
|
||||||
darwinFakeMouseButtonMask = darwinFakeMouse3Mask;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
(*darwinEventQueue.pPtr->processInputProc)
|
|
||||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
miPointerAbsoluteCursor(xe.u.keyButtonPointer.rootX,
|
ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n");
|
||||||
xe.u.keyButtonPointer.rootY,
|
|
||||||
xe.u.keyButtonPointer.time);
|
|
||||||
if (darwinFakeButtons && xe.u.u.detail == 1 &&
|
|
||||||
darwinFakeMouseButtonDown)
|
|
||||||
{
|
|
||||||
// If last mousedown was a fake click, don't check for
|
|
||||||
// mouse modifiers here. The user may have released the
|
|
||||||
// modifiers before the mouse button.
|
|
||||||
xe.u.u.detail = darwinFakeMouseButtonDown;
|
|
||||||
darwinFakeMouseButtonDown = 0;
|
|
||||||
(*darwinEventQueue.pPtr->processInputProc)
|
|
||||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
|
||||||
|
|
||||||
// Bring modifiers back up to date
|
|
||||||
DarwinUpdateModifiers(&xe, KeyPress,
|
|
||||||
darwinFakeMouseButtonMask & old_flags);
|
|
||||||
darwinFakeMouseButtonMask = 0;
|
|
||||||
} else {
|
|
||||||
(*darwinEventQueue.pPtr->processInputProc)
|
|
||||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
miPointerAbsoluteCursor(xe.u.keyButtonPointer.rootX,
|
ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n");
|
||||||
xe.u.keyButtonPointer.rootY,
|
|
||||||
xe.u.keyButtonPointer.time);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinUpdateModifiers:
|
case kXDarwinUpdateModifiers:
|
||||||
{
|
ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n");
|
||||||
// Update modifier state.
|
|
||||||
// Any amount of modifiers may have changed.
|
|
||||||
int flags = xe.u.clientMessage.u.l.longs0;
|
|
||||||
DarwinUpdateModifiers(&xe, KeyRelease,
|
|
||||||
old_flags & ~flags);
|
|
||||||
DarwinUpdateModifiers(&xe, KeyPress,
|
|
||||||
~old_flags & flags);
|
|
||||||
old_flags = flags;
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case kXDarwinUpdateButtons:
|
case kXDarwinUpdateButtons:
|
||||||
{
|
ErrorF("Unexpected XDarwinScrollWheel event in DarwinProcessInputEvents\n");
|
||||||
long hwDelta = xe.u.clientMessage.u.l.longs0;
|
|
||||||
long hwButtons = xe.u.clientMessage.u.l.longs1;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 1; i < 5; i++) {
|
|
||||||
if (hwDelta & (1 << i)) {
|
|
||||||
// IOKit and X have different numbering for the
|
|
||||||
// middle and right mouse buttons.
|
|
||||||
if (i == 1) {
|
|
||||||
xe.u.u.detail = 3;
|
|
||||||
} else if (i == 2) {
|
|
||||||
xe.u.u.detail = 2;
|
|
||||||
} else {
|
|
||||||
xe.u.u.detail = i + 1;
|
|
||||||
}
|
|
||||||
if (hwButtons & (1 << i)) {
|
|
||||||
xe.u.u.type = ButtonPress;
|
|
||||||
} else {
|
|
||||||
xe.u.u.type = ButtonRelease;
|
|
||||||
}
|
|
||||||
(*darwinEventQueue.pPtr->processInputProc)
|
|
||||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case kXDarwinScrollWheel:
|
case kXDarwinScrollWheel:
|
||||||
{
|
ErrorF("Unexpected XDarwinScrollWheel event in DarwinProcessInputEvents\n");
|
||||||
short count = xe.u.clientMessage.u.s.shorts0;
|
|
||||||
|
|
||||||
if (count > 0) {
|
|
||||||
xe.u.u.detail = SCROLLWHEELUPFAKE;
|
|
||||||
} else {
|
|
||||||
xe.u.u.detail = SCROLLWHEELDOWNFAKE;
|
|
||||||
count = -count;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (; count; --count) {
|
|
||||||
xe.u.u.type = ButtonPress;
|
|
||||||
(*darwinEventQueue.pPtr->processInputProc)
|
|
||||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
|
||||||
xe.u.u.type = ButtonRelease;
|
|
||||||
(*darwinEventQueue.pPtr->processInputProc)
|
|
||||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Check for mode specific event
|
// Check for mode specific event
|
||||||
|
@ -473,5 +351,96 @@ void ProcessInputEvents(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
miPointerUpdate();
|
// miPointerUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sends a null byte down darwinEventWriteFD, which will cause the
|
||||||
|
Dispatch() event loop to check out event queue */
|
||||||
|
void DarwinPokeEQ(void) {
|
||||||
|
char nullbyte=0;
|
||||||
|
input_check_flag++;
|
||||||
|
// <daniels> bushing: oh, i ... er ... christ.
|
||||||
|
write(darwinEventWriteFD, &nullbyte, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y) {
|
||||||
|
static int darwinFakeMouseButtonDown = 0;
|
||||||
|
static int darwinFakeMouseButtonMask = 0;
|
||||||
|
int i, num_events;
|
||||||
|
int valuators[2] = {pointer_x, pointer_y};
|
||||||
|
if (ev_type == ButtonPress && darwinFakeButtons && ev_button == 1) {
|
||||||
|
// Mimic multi-button mouse with modifier-clicks
|
||||||
|
// If both sets of modifiers are pressed,
|
||||||
|
// button 2 is clicked.
|
||||||
|
if ((old_flags & darwinFakeMouse2Mask) == darwinFakeMouse2Mask) {
|
||||||
|
DarwinSimulateMouseClick(pointer_x, pointer_y, 2, darwinFakeMouse2Mask);
|
||||||
|
darwinFakeMouseButtonDown = 2;
|
||||||
|
darwinFakeMouseButtonMask = darwinFakeMouse2Mask;
|
||||||
|
} else if ((old_flags & darwinFakeMouse3Mask) == darwinFakeMouse3Mask) {
|
||||||
|
DarwinSimulateMouseClick(pointer_x, pointer_y, 3, darwinFakeMouse3Mask);
|
||||||
|
darwinFakeMouseButtonDown = 3;
|
||||||
|
darwinFakeMouseButtonMask = darwinFakeMouse3Mask;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ev_type == ButtonRelease && darwinFakeButtons && darwinFakeMouseButtonDown) {
|
||||||
|
// If last mousedown was a fake click, don't check for
|
||||||
|
// mouse modifiers here. The user may have released the
|
||||||
|
// modifiers before the mouse button.
|
||||||
|
ev_button = darwinFakeMouseButtonDown;
|
||||||
|
darwinFakeMouseButtonDown = 0;
|
||||||
|
// Bring modifiers back up to date
|
||||||
|
DarwinUpdateModifiers(KeyPress, darwinFakeMouseButtonMask & old_flags);
|
||||||
|
darwinFakeMouseButtonMask = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
num_events = GetPointerEvents(darwinEvents, darwinPointer, ev_type, ev_button,
|
||||||
|
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||||
|
|
||||||
|
for(i=0; i<num_events; i++) mieqEnqueue (darwinPointer,&darwinEvents[i]);
|
||||||
|
DarwinPokeEQ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DarwinSendKeyboardEvents(int ev_type, int keycode) {
|
||||||
|
int i, num_events;
|
||||||
|
if (old_flags == 0 && darwinSyncKeymap && darwinKeymapFile == NULL) {
|
||||||
|
/* See if keymap has changed. */
|
||||||
|
|
||||||
|
static unsigned int last_seed;
|
||||||
|
unsigned int this_seed;
|
||||||
|
|
||||||
|
this_seed = DarwinModeSystemKeymapSeed();
|
||||||
|
if (this_seed != last_seed) {
|
||||||
|
last_seed = this_seed;
|
||||||
|
DarwinKeyboardReload(darwinKeyboard);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
num_events = GetKeyboardEvents(darwinEvents, darwinKeyboard, ev_type, keycode + MIN_KEYCODE);
|
||||||
|
for(i=0; i<num_events; i++) mieqEnqueue(darwinKeyboard,&darwinEvents[i]);
|
||||||
|
DarwinPokeEQ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Send the appropriate number of button 4 / 5 clicks to emulate scroll wheel */
|
||||||
|
void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y) {
|
||||||
|
int i;
|
||||||
|
int ev_button = count > 0.0f ? 4 : 5;
|
||||||
|
int valuators[2] = {pointer_x, pointer_y};
|
||||||
|
|
||||||
|
for (count = fabs(count); count > 0.0; count = count - 1.0f) {
|
||||||
|
int num_events = GetPointerEvents(darwinEvents, darwinPointer, ButtonPress, ev_button,
|
||||||
|
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||||
|
for(i=0; i<num_events; i++) mieqEnqueue(darwinPointer,&darwinEvents[i]);
|
||||||
|
num_events = GetPointerEvents(darwinEvents, darwinPointer, ButtonRelease, ev_button,
|
||||||
|
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||||
|
for(i=0; i<num_events; i++) mieqEnqueue(darwinPointer,&darwinEvents[i]);
|
||||||
|
}
|
||||||
|
DarwinPokeEQ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Send the appropriate KeyPress/KeyRelease events to GetKeyboardEvents to
|
||||||
|
reflect changing modifier flags (alt, control, meta, etc) */
|
||||||
|
void DarwinUpdateModKeys(int flags) {
|
||||||
|
DarwinUpdateModifiers(KeyRelease, old_flags & ~flags);
|
||||||
|
DarwinUpdateModifiers(KeyPress, ~old_flags & flags);
|
||||||
|
old_flags = flags;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,15 +49,11 @@
|
||||||
/** Initialize a private area in \a pScreen for pixmap information. */
|
/** Initialize a private area in \a pScreen for pixmap information. */
|
||||||
Bool dmxInitPixmap(ScreenPtr pScreen)
|
Bool dmxInitPixmap(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
#ifdef PIXPRIV
|
|
||||||
if (!AllocatePixmapPrivate(pScreen, dmxPixPrivateIndex,
|
if (!AllocatePixmapPrivate(pScreen, dmxPixPrivateIndex,
|
||||||
sizeof(dmxPixPrivRec)))
|
sizeof(dmxPixPrivRec)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#else
|
|
||||||
#error Must define PIXPRIV to compile DMX X server
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create a pixmap on the back-end server. */
|
/** Create a pixmap on the back-end server. */
|
||||||
|
|
|
@ -70,9 +70,7 @@ static unsigned long *dmxCursorGeneration;
|
||||||
|
|
||||||
int dmxGCPrivateIndex; /**< Private index for GCs */
|
int dmxGCPrivateIndex; /**< Private index for GCs */
|
||||||
int dmxWinPrivateIndex; /**< Private index for Windows */
|
int dmxWinPrivateIndex; /**< Private index for Windows */
|
||||||
#ifdef PIXPRIV
|
|
||||||
int dmxPixPrivateIndex; /**< Private index for Pixmaps */
|
int dmxPixPrivateIndex; /**< Private index for Pixmaps */
|
||||||
#endif
|
|
||||||
int dmxFontPrivateIndex; /**< Private index for Fonts */
|
int dmxFontPrivateIndex; /**< Private index for Fonts */
|
||||||
int dmxScreenPrivateIndex; /**< Private index for Screens */
|
int dmxScreenPrivateIndex; /**< Private index for Screens */
|
||||||
int dmxColormapPrivateIndex; /**< Private index for Colormaps */
|
int dmxColormapPrivateIndex; /**< Private index for Colormaps */
|
||||||
|
@ -233,14 +231,10 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[])
|
||||||
if (dmxWinPrivateIndex == -1)
|
if (dmxWinPrivateIndex == -1)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
#ifdef PIXPRIV
|
|
||||||
/* Allocate pixmap private index */
|
/* Allocate pixmap private index */
|
||||||
dmxPixPrivateIndex = AllocatePixmapPrivateIndex();
|
dmxPixPrivateIndex = AllocatePixmapPrivateIndex();
|
||||||
if (dmxPixPrivateIndex == -1)
|
if (dmxPixPrivateIndex == -1)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#else
|
|
||||||
#error Must define PIXPRIV to compile DMX X server
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Allocate font private index */
|
/* Allocate font private index */
|
||||||
dmxFontPrivateIndex = AllocateFontPrivateIndex();
|
dmxFontPrivateIndex = AllocateFontPrivateIndex();
|
||||||
|
|
|
@ -56,6 +56,7 @@ XORG_LIBS = \
|
||||||
parser/libxf86config.a \
|
parser/libxf86config.a \
|
||||||
dixmods/libdixmods.la \
|
dixmods/libdixmods.la \
|
||||||
modes/libxf86modes.a \
|
modes/libxf86modes.a \
|
||||||
|
ramdac/libramdac.a \
|
||||||
ddc/libddc.a \
|
ddc/libddc.a \
|
||||||
i2c/libi2c.a \
|
i2c/libi2c.a \
|
||||||
@XORG_LIBS@
|
@XORG_LIBS@
|
||||||
|
|
|
@ -968,7 +968,7 @@ localAllocateOffscreenLinear(
|
||||||
linear->size = h * w;
|
linear->size = h * w;
|
||||||
linear->offset = (pitch * area->box.y1) + area->box.x1;
|
linear->offset = (pitch * area->box.y1) + area->box.x1;
|
||||||
if (gran > 1)
|
if (gran > 1)
|
||||||
linear->offset += ((linear->offset + gran - 1) / gran) * gran;
|
linear->offset = ((linear->offset + gran - 1) / gran) * gran;
|
||||||
linear->granularity = gran;
|
linear->granularity = gran;
|
||||||
linear->MoveLinearCallback = moveCB;
|
linear->MoveLinearCallback = moveCB;
|
||||||
linear->RemoveLinearCallback = removeCB;
|
linear->RemoveLinearCallback = removeCB;
|
||||||
|
|
|
@ -0,0 +1,474 @@
|
||||||
|
Multi-monitor Mode Setting APIs
|
||||||
|
Keith Packard, <keithp@keithp.com
|
||||||
|
6 March 2007
|
||||||
|
|
||||||
|
1. Introduction
|
||||||
|
|
||||||
|
This document describes a set of mode setting APIs added in X server version
|
||||||
|
1.3 that support multiple monitors per card. These interfaces expose the
|
||||||
|
underlying hardware CRTC and output concepts to the xf86 DDX layer so that
|
||||||
|
the implementation of initial server setup and mode changes through
|
||||||
|
extensions can be shared across drivers. In addition, these new interfaces
|
||||||
|
support a new configuration mechanism as well which allows each monitor to
|
||||||
|
be customized separately providing a consistent cross-driver configuration
|
||||||
|
mechanism that supports the full range of output features.
|
||||||
|
|
||||||
|
All of the code implementing this interface can be found in hw/xfree86/modes
|
||||||
|
in the X server sources.
|
||||||
|
|
||||||
|
2. Overview
|
||||||
|
|
||||||
|
This document describes both the driver API and the configuration data
|
||||||
|
placed in xorg.conf; these are entirely separate as the driver has no
|
||||||
|
interaction with the configuration information at all. Much of the structure
|
||||||
|
here is cloned from the RandR extension version 1.2 additions which deal
|
||||||
|
with the same kinds of information.
|
||||||
|
|
||||||
|
2.1 API overview
|
||||||
|
|
||||||
|
The mode setting API is expressed through two new driver-visible objects,
|
||||||
|
the 'CRTC' (xf86CrtcRec) and the 'Output' (xf86OutputRec). A CRTC refers to
|
||||||
|
hardware within the video system that can scan a subset of the framebuffer
|
||||||
|
and generate a video signal. An Output receives that signal and transmits it
|
||||||
|
to a monitor, projector or other device.
|
||||||
|
|
||||||
|
The xf86CrtcRec and xf86OutputRec contain a small amount of state data
|
||||||
|
related to the object along with a pointer to a set of functions provided by
|
||||||
|
the driver that manipulate the object in fairly simple ways.
|
||||||
|
|
||||||
|
To emulate older behaviour, one of the outputs is picked as the 'compat'
|
||||||
|
output; this output changes over time as outputs are detected and used, the
|
||||||
|
goal is to always have one 'special' output which is used for operations
|
||||||
|
which need a single defined monitor (like XFree86-VidModeExtension mode
|
||||||
|
setting, RandR 1.1 mode setting, DDC property setting, etc.).
|
||||||
|
|
||||||
|
2.1.1 Output overview
|
||||||
|
|
||||||
|
As outputs are connected to monitors, they hold a list of modes supported by
|
||||||
|
the monitor. If the monitor and output support DDC, then the list of modes
|
||||||
|
generally comes from the EDID data in the monitor. Otherwise, the server
|
||||||
|
uses the standard VESA modes, pruned by monitor timing. If the configuration
|
||||||
|
file doesn't contain monitor timing data, the server uses default timing
|
||||||
|
information which supports 640x480, 800x600 and 1024x768 all with a 60Hz
|
||||||
|
refresh rate.
|
||||||
|
|
||||||
|
As hardware often limits possible configuration combinations, each output
|
||||||
|
knows the set of CRTCs that it can be connected to as well as the set of
|
||||||
|
other outputs which can be simutaneously connected to a CRTC.
|
||||||
|
|
||||||
|
2.1.2 CRTC overview
|
||||||
|
|
||||||
|
CRTCs serve only to stream frame buffer data to outputs using a mode line.
|
||||||
|
Ideally, they would not be presented to the user at all, and in fact the
|
||||||
|
configuration file doesn't expose them. The RandR 1.2 protocol does, but the
|
||||||
|
hope there is that client-side applications will hide them carefully away.
|
||||||
|
|
||||||
|
Each crtc has an associated cursor, along with the current configuration.
|
||||||
|
All of the data needed to determine valid configurations is contained within
|
||||||
|
the Outputs.
|
||||||
|
|
||||||
|
2.2 Configuration overview
|
||||||
|
|
||||||
|
As outputs drive monitors, the "Monitor" section has been repurposed to
|
||||||
|
define their configuration. This provides for a bit more syntax than
|
||||||
|
the large list of driver-specific options that were used in the past for
|
||||||
|
similar configuration.
|
||||||
|
|
||||||
|
However, the existing "Monitor" section referenced by the active "Screen"
|
||||||
|
section no longer has any use at all; some sensible meaning for this
|
||||||
|
parameter is needed now that a Screen can have multiple Monitors.
|
||||||
|
|
||||||
|
3. Public Functions
|
||||||
|
|
||||||
|
3.1 PreInit functions
|
||||||
|
|
||||||
|
These functions should be used during the driver PreInit phase, they are
|
||||||
|
arranged in the order they should be invoked.
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86CrtcConfigInit (ScrnInfoPtr scrn
|
||||||
|
const xf86CrtcConfigFuncsRec *funcs)
|
||||||
|
|
||||||
|
This function allocates and initializes structures needed to track CRTC and
|
||||||
|
Output state.
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86CrtcSetSizeRange (ScrnInfoPtr scrn,
|
||||||
|
int minWidth, int minHeight,
|
||||||
|
int maxWidth, int maxHeight)
|
||||||
|
|
||||||
|
This sets the range of screen sizes supported by the driver.
|
||||||
|
|
||||||
|
xf86CrtcPtr
|
||||||
|
xf86CrtcCreate (ScrnInfoPtr scrn,
|
||||||
|
const xf86CrtcFuncsRec *funcs)
|
||||||
|
|
||||||
|
Create one CRTC object. See the discussion below for a description of the
|
||||||
|
contents of the xf86CrtcFuncsRec. Note that this is done in PreInit, so it
|
||||||
|
should not be re-invoked at each server generation. Create one of these for
|
||||||
|
each CRTC present in the hardware.
|
||||||
|
|
||||||
|
xf86OutputPtr
|
||||||
|
xf86OutputCreate (ScrnInfoPtr scrn,
|
||||||
|
const xf86OutputFuncsRec *funcs,
|
||||||
|
const char *name)
|
||||||
|
|
||||||
|
Create one Output object. See the discussion below for a description of the
|
||||||
|
contents of the xf86OutputFuncsRec. This is also called from PreInit and
|
||||||
|
need not be re-invoked at each ScreenInit time. An Output should be created
|
||||||
|
for every Output present in the hardware, not just for outputs which have
|
||||||
|
detected monitors.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86OutputRename (xf86OutputPtr output, const char *name)
|
||||||
|
|
||||||
|
If necessary, the name of an output can be changed after it is created using
|
||||||
|
this function.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
|
||||||
|
|
||||||
|
Using the resources provided, and the configuration specified by the user,
|
||||||
|
this function computes an initial configuration for the server. It tries to
|
||||||
|
enable as much hardware as possible using some fairly simple heuristics.
|
||||||
|
|
||||||
|
The 'canGrow' parameter indicates that the frame buffer does not have a fixed
|
||||||
|
size (fixed size frame buffers are required by XAA). When the frame buffer
|
||||||
|
has a fixed size, the configuration selects a 'reasonablely large' frame
|
||||||
|
buffer so that common reconfiguration options are possible. For resizable
|
||||||
|
frame buffers, the frame buffer is set to the smallest size that encloses
|
||||||
|
the desired configuration.
|
||||||
|
|
||||||
|
3.2 ScreenInit functions
|
||||||
|
|
||||||
|
These functions should be used during the driver ScreenInit phase.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86DiDGAInit (ScreenPtr screen, unsigned long dga_address)
|
||||||
|
|
||||||
|
This function provides driver-independent accelerated DGA support for some
|
||||||
|
of the DGA operations; using this, the driver can avoid needing to implement
|
||||||
|
any of the rest of DGA.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86SaveScreen(ScreenPtr pScreen, int mode)
|
||||||
|
|
||||||
|
Stick this in pScreen->SaveScreen and the core X screen saver will be
|
||||||
|
implemented by disabling outputs and crtcs using their dpms functions.
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86DPMSSet(ScrnInfoPtr scrn, int mode, int flags)
|
||||||
|
|
||||||
|
Pass this function to xf86DPMSInit and all DPMS mode switching will be
|
||||||
|
managed by using the dpms functions provided by the Outputs and CRTCs.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86CrtcScreenInit (ScreenPtr screen)
|
||||||
|
|
||||||
|
This function completes the screen initialization process for the crtc and
|
||||||
|
output objects. Call it near the end of the ScreenInit function, after the
|
||||||
|
frame buffer and acceleration layers have been added.
|
||||||
|
|
||||||
|
3.3 EnterVT functions
|
||||||
|
|
||||||
|
Functions used during EnterVT, or whenever the current configuration needs
|
||||||
|
to be applied to the hardware.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86SetDesiredModes (ScrnInfoPtr scrn)
|
||||||
|
|
||||||
|
xf86InitialConfiguration selects the desired configuration at PreInit time;
|
||||||
|
when the server finally hits ScreenInit, xf86SetDesiredModes is used by the
|
||||||
|
driver to take that configuration and apply it to the hardware. In addition,
|
||||||
|
successful mode selection at other times updates the configuration that will
|
||||||
|
be used by this function, so LeaveVT/EnterVT pairs can simply invoke this
|
||||||
|
and return to the previous configuration.
|
||||||
|
|
||||||
|
3.4 SwitchMode functions
|
||||||
|
|
||||||
|
Functions called from the pScrn->SwitchMode hook, which is used by the
|
||||||
|
XFree86-VidModeExtension and the keypad mode switch commands.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86SetSingleMode (ScrnInfoPtr scrn,
|
||||||
|
DisplayModePtr desired,
|
||||||
|
Rotation rotation)
|
||||||
|
|
||||||
|
This function applies the specified mode to all active outputs. Which is to
|
||||||
|
say, it picks reasonable modes for all active outputs, attempting to get the
|
||||||
|
screen to the specified size while not breaking anything that is currently
|
||||||
|
working.
|
||||||
|
|
||||||
|
3.7 get_modes functions
|
||||||
|
|
||||||
|
Functions called during output->get_modes to help build lists of modes
|
||||||
|
|
||||||
|
xf86MonPtr
|
||||||
|
xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus)
|
||||||
|
|
||||||
|
This returns the EDID data structure for the 'output' using the I2C bus
|
||||||
|
'pDDCBus'. This has no effect on 'output' itself.
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon)
|
||||||
|
|
||||||
|
Once the EDID data has been fetched, this call applies the EDID data to the
|
||||||
|
output object, setting the physical size and also various properties, like
|
||||||
|
the DDC root window property (when output is the 'compat' output), and the
|
||||||
|
RandR 1.2 EDID output properties.
|
||||||
|
|
||||||
|
DisplayModePtr
|
||||||
|
xf86OutputGetEDIDModes (xf86OutputPtr output)
|
||||||
|
|
||||||
|
Given an EDID data structure, this function computes a list of suitable
|
||||||
|
modes. This function also applies a sequence of 'quirks' during this process
|
||||||
|
so that the returned modes may not actually match the mode data present in
|
||||||
|
the EDID data.
|
||||||
|
|
||||||
|
3.6 Other functions
|
||||||
|
|
||||||
|
These remaining functions in the API can be used by the driver as needed.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
|
||||||
|
int x, int y)
|
||||||
|
|
||||||
|
Applies a mode to a CRTC. All of the outputs which are currently using the
|
||||||
|
specified CRTC are included in the mode setting process. 'x' and 'y' are the
|
||||||
|
offset within the frame buffer that the crtc is placed at. No checking is
|
||||||
|
done in this function to ensure that the mode is usable by the active
|
||||||
|
outputs.
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY)
|
||||||
|
|
||||||
|
This discards the mode lists for all outputs, re-detects monitor presence
|
||||||
|
and then acquires new mode lists for all monitors which are not disconnected.
|
||||||
|
Monitor configuration data is used to modify the mode lists returned by the
|
||||||
|
outputs. 'maxX' and 'maxY' limit the maximum size modes that will be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86SetScrnInfoModes (ScrnInfoPtr pScrn)
|
||||||
|
|
||||||
|
This copies the 'compat' output mode list into the pScrn modes list which is
|
||||||
|
used by the XFree86-VidModeExtension and the keypad mode switching
|
||||||
|
operations. The current 'desired' mode for the CRTC associated with the
|
||||||
|
'compat' output is placed first in this list to indicate the current mode.
|
||||||
|
Usually, the driver won't need to call this function as
|
||||||
|
xf86InitialConfiguration will do so automatically, as well as any RandR
|
||||||
|
functions which reprobe for modes. However, if the driver reprobes for modes
|
||||||
|
at other times using xf86ProbeOutputModes, this function needs to be called.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86DiDGAReInit (ScreenPtr pScreen)
|
||||||
|
|
||||||
|
This is similar to xf86SetScrnInfoModes, but it applies the 'compat' output
|
||||||
|
mode list to the set of modes advertised by the DGA extension; it needs to
|
||||||
|
be called whenever xf86ProbeOutputModes is invoked.
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86DisableUnusedFunctions(ScrnInfoPtr pScrn)
|
||||||
|
|
||||||
|
After any sequence of calls using xf86CrtcSetMode, this function cleans up
|
||||||
|
any leftover Output and CRTC objects by disabling them, saving power. It is
|
||||||
|
safe to call this whenever the server is running as it only disables objects
|
||||||
|
which are not currently in use.
|
||||||
|
|
||||||
|
4. CRTC operations
|
||||||
|
|
||||||
|
4.1 CRTC functions
|
||||||
|
|
||||||
|
These functions provide an abstract interface for the CRTC object; most
|
||||||
|
manipulation of the CRTC object is done through these functions.
|
||||||
|
|
||||||
|
void
|
||||||
|
crtc->funcs->dpms (xf86CrtcPtr crtc, int mode)
|
||||||
|
|
||||||
|
Where 'mode' is one of DPMSModeOff, DPMSModeSuspend, DPMSModeStandby or
|
||||||
|
DPMSModeOn. This requests that the crtc go to the specified power state.
|
||||||
|
When changing power states, the output dpms functions are invoked before the
|
||||||
|
crtc dpms functions.
|
||||||
|
|
||||||
|
void
|
||||||
|
crtc->funcs->save (xf86CrtcPtr crtc)
|
||||||
|
|
||||||
|
void
|
||||||
|
crtc->funcs->restore (xf86CrtcPtr crtc)
|
||||||
|
|
||||||
|
Preserve/restore any register contents related to the CRTC. These are
|
||||||
|
strictly a convenience for the driver writer; if the existing driver has
|
||||||
|
fully operation save/restore functions, you need not place any additional
|
||||||
|
code here. In particular, the server itself never uses this function.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
crtc->funcs->lock (xf86CrtcPtr crtc)
|
||||||
|
|
||||||
|
void
|
||||||
|
crtc->funcs->unlock (xf86CrtcPtr crtc)
|
||||||
|
|
||||||
|
These functions are invoked around mode setting operations; the intent is
|
||||||
|
that DRI locking be done here to prevent DRI applications from manipulating
|
||||||
|
the hardware while the server is busy changing the output configuration. If
|
||||||
|
the lock function returns FALSE, the unlock function will not be invoked.
|
||||||
|
|
||||||
|
Bool
|
||||||
|
crtc->funcs->mode_fixup (xf86CrtcPtr crtc,
|
||||||
|
DisplayModePtr mode,
|
||||||
|
DisplayModePtr adjusted_mode)
|
||||||
|
|
||||||
|
This call gives the CRTC a chance to see what mode will be set and to
|
||||||
|
comment on the mode by changing 'adjusted_mode' as needed. This function
|
||||||
|
shall not modify the state of the crtc hardware at all. If the CRTC cannot
|
||||||
|
accept this mode, this function may return FALSE.
|
||||||
|
|
||||||
|
void
|
||||||
|
crtc->funcs->prepare (xf86CrtcPtr crtc)
|
||||||
|
|
||||||
|
This call is made just before the mode is set to make the hardware ready for
|
||||||
|
the operation. A usual function to perform here is to disable the crtc so
|
||||||
|
that mode setting can occur with clocks turned off and outputs deactivated.
|
||||||
|
|
||||||
|
void
|
||||||
|
crtc->funcs->mode_set (xf86CrtcPtr crtc,
|
||||||
|
DisplayModePtr mode,
|
||||||
|
DisplayModePtr adjusted_mode)
|
||||||
|
|
||||||
|
This function applies the specified mode (possibly adjusted by the CRTC
|
||||||
|
and/or Outputs).
|
||||||
|
|
||||||
|
void
|
||||||
|
crtc->funcs->commit (xf86CrtcPtr crtc)
|
||||||
|
|
||||||
|
Once the mode has been applied to the CRTC and Outputs, this function is
|
||||||
|
invoked to let the hardware turn things back on.
|
||||||
|
|
||||||
|
void
|
||||||
|
crtc->funcs->gamma_set (xf86CrtcPtr crtc, CARD16 *red,
|
||||||
|
CARD16 *green, CARD16 *blue, int size)
|
||||||
|
|
||||||
|
This function adjusts the gamma ramps for the specified crtc.
|
||||||
|
|
||||||
|
void *
|
||||||
|
crtc->funcs->shadow_allocate (xf86CrtcPtr crtc, int width, int height)
|
||||||
|
|
||||||
|
This function allocates frame buffer space for a shadow frame buffer. When
|
||||||
|
allocated, the crtc must scan from the shadow instead of the main frame
|
||||||
|
buffer. This is used for rotation. The address returned is passed to the
|
||||||
|
shadow_create function. This function should return NULL on failure.
|
||||||
|
|
||||||
|
PixmapPtr
|
||||||
|
crtc->funcs->shadow_create (xf86CrtcPtr crtc, void *data,
|
||||||
|
int width, int height)
|
||||||
|
|
||||||
|
This function creates a pixmap object that will be used as a shadow of the
|
||||||
|
main frame buffer for CRTCs which are rotated or reflected. 'data' is the
|
||||||
|
value returned by shadow_allocate.
|
||||||
|
|
||||||
|
void
|
||||||
|
crtc->funcs->shadow_destroy (xf86CrtcPtr crtc, PixmapPtr pPixmap,
|
||||||
|
void *data)
|
||||||
|
|
||||||
|
Destroys any associated shadow objects. If pPixmap is NULL, then a pixmap
|
||||||
|
was not created, but 'data' may still be non-NULL indicating that the shadow
|
||||||
|
had been allocated.
|
||||||
|
|
||||||
|
void
|
||||||
|
crtc->funcs->destroy (xf86CrtcPtr crtc)
|
||||||
|
|
||||||
|
When a CRTC is destroyed (which only happens in error cases), this function
|
||||||
|
can clean up any driver-specific data.
|
||||||
|
|
||||||
|
4.2 CRTC fields
|
||||||
|
|
||||||
|
The CRTC object is not opaque; there are several fields of interest to the
|
||||||
|
driver writer.
|
||||||
|
|
||||||
|
struct _xf86Crtc {
|
||||||
|
/**
|
||||||
|
* Associated ScrnInfo
|
||||||
|
*/
|
||||||
|
ScrnInfoPtr scrn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Active state of this CRTC
|
||||||
|
*
|
||||||
|
* Set when this CRTC is driving one or more outputs
|
||||||
|
*/
|
||||||
|
Bool enabled;
|
||||||
|
|
||||||
|
/** Track whether cursor is within CRTC range */
|
||||||
|
Bool cursorInRange;
|
||||||
|
|
||||||
|
/** Track state of cursor associated with this CRTC */
|
||||||
|
Bool cursorShown;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Active mode
|
||||||
|
*
|
||||||
|
* This reflects the mode as set in the CRTC currently
|
||||||
|
* It will be cleared when the VT is not active or
|
||||||
|
* during server startup
|
||||||
|
*/
|
||||||
|
DisplayModeRec mode;
|
||||||
|
Rotation rotation;
|
||||||
|
PixmapPtr rotatedPixmap;
|
||||||
|
void *rotatedData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Position on screen
|
||||||
|
*
|
||||||
|
* Locates this CRTC within the frame buffer
|
||||||
|
*/
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Desired mode
|
||||||
|
*
|
||||||
|
* This is set to the requested mode, independent of
|
||||||
|
* whether the VT is active. In particular, it receives
|
||||||
|
* the startup configured mode and saves the active mode
|
||||||
|
* on VT switch.
|
||||||
|
*/
|
||||||
|
DisplayModeRec desiredMode;
|
||||||
|
Rotation desiredRotation;
|
||||||
|
int desiredX, desiredY;
|
||||||
|
|
||||||
|
/** crtc-specific functions */
|
||||||
|
const xf86CrtcFuncsRec *funcs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Driver private
|
||||||
|
*
|
||||||
|
* Holds driver-private information
|
||||||
|
*/
|
||||||
|
void *driver_private;
|
||||||
|
#ifdef RANDR_12_INTERFACE
|
||||||
|
/**
|
||||||
|
* RandR crtc
|
||||||
|
*
|
||||||
|
* When RandR 1.2 is available, this
|
||||||
|
* points at the associated crtc object
|
||||||
|
*/
|
||||||
|
RRCrtcPtr randr_crtc;
|
||||||
|
#else
|
||||||
|
void *randr_crtc;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
5. Output functions.
|
||||||
|
|
||||||
|
6. Configuration
|
||||||
|
|
||||||
|
Because the configuration file syntax is fixed,
|
||||||
|
this was done by creating new "Driver" section options that hook specific
|
||||||
|
outputs to specific "Monitor" sections in the file. The option:
|
||||||
|
section of the form:
|
||||||
|
|
||||||
|
Option "monitor-VGA" "My VGA Monitor"
|
||||||
|
|
||||||
|
connects the VGA output of this driver to the "Monitor" section with
|
||||||
|
Identifier "My VGA Monitor". All of the usual monitor options can now be
|
||||||
|
placed in that "Monitor" section and will be applied to the VGA output
|
||||||
|
configuration.
|
|
@ -72,6 +72,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#include "xf86_OSproc.h"
|
#include "xf86_OSproc.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
|
|
||||||
|
#define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
|
||||||
|
|
||||||
#if !defined(PANORAMIX)
|
#if !defined(PANORAMIX)
|
||||||
extern Bool noPanoramiXExtension;
|
extern Bool noPanoramiXExtension;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2203,8 +2205,8 @@ DRICreatePCIBusID(pciVideoPtr PciInfo)
|
||||||
|
|
||||||
tag = pciTag(PciInfo->bus, PciInfo->device, PciInfo->func);
|
tag = pciTag(PciInfo->bus, PciInfo->device, PciInfo->func);
|
||||||
domain = xf86GetPciDomain(tag);
|
domain = xf86GetPciDomain(tag);
|
||||||
snprintf(busID, 20, "pci:%04x:%02x:%02x.%d", domain, PciInfo->bus,
|
snprintf(busID, 20, "pci:%04x:%02x:%02x.%d", domain,
|
||||||
PciInfo->device, PciInfo->func);
|
PCI_BUS_NO_DOMAIN(PciInfo->bus), PciInfo->device, PciInfo->func);
|
||||||
return busID;
|
return busID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ static XF86ModuleVersionInfo uda1380VersRec =
|
||||||
MODULEVENDORSTRING,
|
MODULEVENDORSTRING,
|
||||||
MODINFOSTRING1,
|
MODINFOSTRING1,
|
||||||
MODINFOSTRING2,
|
MODINFOSTRING2,
|
||||||
XF86_VERSION_CURRENT,
|
XORG_VERSION_CURRENT,
|
||||||
1, 0, 0,
|
1, 0, 0,
|
||||||
ABI_CLASS_VIDEODRV, /* This needs the video driver ABI */
|
ABI_CLASS_VIDEODRV, /* This needs the video driver ABI */
|
||||||
ABI_VIDEODRV_VERSION,
|
ABI_VIDEODRV_VERSION,
|
||||||
|
|
|
@ -2,7 +2,8 @@ noinst_LIBRARIES = libloader.a
|
||||||
|
|
||||||
INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \
|
INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \
|
||||||
-I$(srcdir)/../vbe -I$(top_srcdir)/miext/cw -I$(srcdir)/../int10 \
|
-I$(srcdir)/../vbe -I$(top_srcdir)/miext/cw -I$(srcdir)/../int10 \
|
||||||
-I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes
|
-I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes \
|
||||||
|
-I$(srcdir)/../ramdac
|
||||||
|
|
||||||
#AM_LDFLAGS = -r
|
#AM_LDFLAGS = -r
|
||||||
AM_CFLAGS = -DIN_LOADER $(DIX_CFLAGS) $(XORG_CFLAGS)
|
AM_CFLAGS = -DIN_LOADER $(DIX_CFLAGS) $(XORG_CFLAGS)
|
||||||
|
|
|
@ -271,10 +271,8 @@ _X_HIDDEN void *dixLookupTab[] = {
|
||||||
SYMFUNC(AllocateColormapPrivateIndex)
|
SYMFUNC(AllocateColormapPrivateIndex)
|
||||||
SYMFUNC(AllocateDevicePrivateIndex)
|
SYMFUNC(AllocateDevicePrivateIndex)
|
||||||
SYMFUNC(AllocateDevicePrivate)
|
SYMFUNC(AllocateDevicePrivate)
|
||||||
#ifdef PIXPRIV
|
|
||||||
SYMFUNC(AllocatePixmapPrivateIndex)
|
SYMFUNC(AllocatePixmapPrivateIndex)
|
||||||
SYMFUNC(AllocatePixmapPrivate)
|
SYMFUNC(AllocatePixmapPrivate)
|
||||||
#endif
|
|
||||||
/* resource.c */
|
/* resource.c */
|
||||||
SYMFUNC(AddResource)
|
SYMFUNC(AddResource)
|
||||||
SYMFUNC(ChangeResourceValue)
|
SYMFUNC(ChangeResourceValue)
|
||||||
|
|
|
@ -841,6 +841,7 @@ DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent)
|
||||||
static const char *compiled_in_modules[] = {
|
static const char *compiled_in_modules[] = {
|
||||||
"ddc",
|
"ddc",
|
||||||
"i2c",
|
"i2c",
|
||||||
|
"ramdac",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -861,7 +862,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
|
||||||
PatternPtr patterns = NULL;
|
PatternPtr patterns = NULL;
|
||||||
int noncanonical = 0;
|
int noncanonical = 0;
|
||||||
char *m = NULL;
|
char *m = NULL;
|
||||||
char **cim;
|
const char **cim;
|
||||||
|
|
||||||
xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
|
xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
|
||||||
|
|
||||||
|
|
|
@ -1220,6 +1220,11 @@ _X_HIDDEN void *xfree86LookupTab[] = {
|
||||||
SYMFUNC(xf86RandR12SetConfig)
|
SYMFUNC(xf86RandR12SetConfig)
|
||||||
SYMFUNC(xf86RandR12SetRotations)
|
SYMFUNC(xf86RandR12SetRotations)
|
||||||
#endif
|
#endif
|
||||||
|
SYMFUNC(xf86_cursors_init)
|
||||||
|
SYMFUNC(xf86_reload_cursors)
|
||||||
|
SYMFUNC(xf86_show_cursors)
|
||||||
|
SYMFUNC(xf86_hide_cursors)
|
||||||
|
SYMFUNC(xf86_cursors_fini)
|
||||||
|
|
||||||
SYMFUNC(xf86DoEDID_DDC1)
|
SYMFUNC(xf86DoEDID_DDC1)
|
||||||
SYMFUNC(xf86DoEDID_DDC2)
|
SYMFUNC(xf86DoEDID_DDC2)
|
||||||
|
|
|
@ -3,6 +3,7 @@ noinst_LIBRARIES = libxf86modes.a
|
||||||
libxf86modes_a_SOURCES = \
|
libxf86modes_a_SOURCES = \
|
||||||
xf86Crtc.c \
|
xf86Crtc.c \
|
||||||
xf86Crtc.h \
|
xf86Crtc.h \
|
||||||
|
xf86Cursors.c \
|
||||||
xf86cvt.c \
|
xf86cvt.c \
|
||||||
xf86DiDGA.c \
|
xf86DiDGA.c \
|
||||||
xf86EdidModes.c \
|
xf86EdidModes.c \
|
||||||
|
@ -16,7 +17,8 @@ libxf86modes_a_SOURCES = \
|
||||||
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
|
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
|
||||||
-I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \
|
-I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \
|
||||||
-I$(srcdir)/../scanpci -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
|
-I$(srcdir)/../scanpci -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
|
||||||
-I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod
|
-I$(srcdir)/../vgahw -I$(srcdir)/../ramdac \
|
||||||
|
-I$(srcdir)/../dixmods/extmod
|
||||||
|
|
||||||
sdk_HEADERS = \
|
sdk_HEADERS = \
|
||||||
xf86Crtc.h \
|
xf86Crtc.h \
|
||||||
|
|
|
@ -282,7 +282,7 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable the outputs and CRTCs before setting the mode. */
|
/* Prepare the outputs and CRTCs before setting the mode. */
|
||||||
for (i = 0; i < xf86_config->num_output; i++) {
|
for (i = 0; i < xf86_config->num_output; i++) {
|
||||||
xf86OutputPtr output = xf86_config->output[i];
|
xf86OutputPtr output = xf86_config->output[i];
|
||||||
|
|
||||||
|
@ -290,10 +290,10 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Disable the output as the first thing we do. */
|
/* Disable the output as the first thing we do. */
|
||||||
output->funcs->dpms(output, DPMSModeOff);
|
output->funcs->prepare(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
crtc->funcs->dpms(crtc, DPMSModeOff);
|
crtc->funcs->prepare(crtc);
|
||||||
|
|
||||||
/* Set up the DPLL and any output state that needs to adjust or depend
|
/* Set up the DPLL and any output state that needs to adjust or depend
|
||||||
* on the DPLL.
|
* on the DPLL.
|
||||||
|
@ -307,12 +307,12 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now, enable the clocks, plane, pipe, and outputs that we set up. */
|
/* Now, enable the clocks, plane, pipe, and outputs that we set up. */
|
||||||
crtc->funcs->dpms(crtc, DPMSModeOn);
|
crtc->funcs->commit(crtc);
|
||||||
for (i = 0; i < xf86_config->num_output; i++)
|
for (i = 0; i < xf86_config->num_output; i++)
|
||||||
{
|
{
|
||||||
xf86OutputPtr output = xf86_config->output[i];
|
xf86OutputPtr output = xf86_config->output[i];
|
||||||
if (output->crtc == crtc)
|
if (output->crtc == crtc)
|
||||||
output->funcs->dpms(output, DPMSModeOn);
|
output->funcs->commit(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX free adjustedmode */
|
/* XXX free adjustedmode */
|
||||||
|
@ -545,6 +545,60 @@ xf86OutputDestroy (xf86OutputPtr output)
|
||||||
xfree (output);
|
xfree (output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called during CreateScreenResources to hook up RandR
|
||||||
|
*/
|
||||||
|
static Bool
|
||||||
|
xf86CrtcCreateScreenResources (ScreenPtr screen)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||||
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
|
||||||
|
screen->CreateScreenResources = config->CreateScreenResources;
|
||||||
|
|
||||||
|
if (!(*screen->CreateScreenResources)(screen))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (!xf86RandR12CreateScreenResources (screen))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called at ScreenInit time to set up
|
||||||
|
*/
|
||||||
|
Bool
|
||||||
|
xf86CrtcScreenInit (ScreenPtr screen)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||||
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
int c;
|
||||||
|
|
||||||
|
/* Rotation */
|
||||||
|
xf86DrvMsg(scrn->scrnIndex, X_INFO, "RandR 1.2 enabled, ignore the following RandR disabled message.\n");
|
||||||
|
xf86DisableRandR(); /* Disable old RandR extension support */
|
||||||
|
xf86RandR12Init (screen);
|
||||||
|
|
||||||
|
/* support all rotations if every crtc has the shadow alloc funcs */
|
||||||
|
for (c = 0; c < config->num_crtc; c++)
|
||||||
|
{
|
||||||
|
xf86CrtcPtr crtc = config->crtc[c];
|
||||||
|
if (!crtc->funcs->shadow_allocate || !crtc->funcs->shadow_create)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (c == config->num_crtc)
|
||||||
|
xf86RandR12SetRotations (screen, RR_Rotate_0 | RR_Rotate_90 |
|
||||||
|
RR_Rotate_180 | RR_Rotate_270);
|
||||||
|
else
|
||||||
|
xf86RandR12SetRotations (screen, RR_Rotate_0);
|
||||||
|
|
||||||
|
/* Wrap CreateScreenResources so we can initialize the RandR code */
|
||||||
|
config->CreateScreenResources = screen->CreateScreenResources;
|
||||||
|
screen->CreateScreenResources = xf86CrtcCreateScreenResources;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static DisplayModePtr
|
static DisplayModePtr
|
||||||
xf86DefaultMode (xf86OutputPtr output, int width, int height)
|
xf86DefaultMode (xf86OutputPtr output, int width, int height)
|
||||||
{
|
{
|
||||||
|
@ -879,13 +933,17 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes)
|
||||||
{
|
{
|
||||||
xf86OutputPtr out_rel = config->output[or];
|
xf86OutputPtr out_rel = config->output[or];
|
||||||
XF86ConfMonitorPtr rel_mon = out_rel->conf_monitor;
|
XF86ConfMonitorPtr rel_mon = out_rel->conf_monitor;
|
||||||
char *name;
|
|
||||||
|
|
||||||
if (rel_mon)
|
if (rel_mon)
|
||||||
name = rel_mon->mon_identifier;
|
{
|
||||||
else
|
if (xf86nameCompare (rel_mon->mon_identifier,
|
||||||
name = out_rel->name;
|
relative_name) == 0)
|
||||||
if (!strcmp (relative_name, name))
|
{
|
||||||
|
relative = config->output[or];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (strcmp (out_rel->name, relative_name) == 0)
|
||||||
{
|
{
|
||||||
relative = config->output[or];
|
relative = config->output[or];
|
||||||
break;
|
break;
|
||||||
|
@ -1100,7 +1158,10 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
|
||||||
output->status = (*output->funcs->detect)(output);
|
output->status = (*output->funcs->detect)(output);
|
||||||
|
|
||||||
if (output->status == XF86OutputStatusDisconnected)
|
if (output->status == XF86OutputStatusDisconnected)
|
||||||
|
{
|
||||||
|
xf86OutputSetEDID (output, NULL);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
memset (&mon_rec, '\0', sizeof (mon_rec));
|
memset (&mon_rec, '\0', sizeof (mon_rec));
|
||||||
|
|
||||||
|
@ -1542,6 +1603,189 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Using the desired mode information in each crtc, set
|
||||||
|
* modes (used in EnterVT functions, or at server startup)
|
||||||
|
*/
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86SetDesiredModes (ScrnInfoPtr scrn)
|
||||||
|
{
|
||||||
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
int c;
|
||||||
|
|
||||||
|
for (c = 0; c < config->num_crtc; c++)
|
||||||
|
{
|
||||||
|
xf86CrtcPtr crtc = config->crtc[c];
|
||||||
|
xf86OutputPtr output = NULL;
|
||||||
|
int o;
|
||||||
|
|
||||||
|
if (config->output[config->compat_output]->crtc == crtc)
|
||||||
|
output = config->output[config->compat_output];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (o = 0; o < config->num_output; o++)
|
||||||
|
if (config->output[o]->crtc == crtc)
|
||||||
|
{
|
||||||
|
output = config->output[o];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Skip disabled crtcs
|
||||||
|
*/
|
||||||
|
if (!output)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* Mark that we'll need to re-set the mode for sure */
|
||||||
|
memset(&crtc->mode, 0, sizeof(crtc->mode));
|
||||||
|
if (!crtc->desiredMode.CrtcHDisplay)
|
||||||
|
{
|
||||||
|
DisplayModePtr mode = xf86OutputFindClosestMode (output, scrn->currentMode);
|
||||||
|
|
||||||
|
if (!mode)
|
||||||
|
return FALSE;
|
||||||
|
crtc->desiredMode = *mode;
|
||||||
|
crtc->desiredRotation = RR_Rotate_0;
|
||||||
|
crtc->desiredX = 0;
|
||||||
|
crtc->desiredY = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!xf86CrtcSetMode (crtc, &crtc->desiredMode, crtc->desiredRotation,
|
||||||
|
crtc->desiredX, crtc->desiredY))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
xf86DisableUnusedFunctions(scrn);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In the current world order, there are lists of modes per output, which may
|
||||||
|
* or may not include the mode that was asked to be set by XFree86's mode
|
||||||
|
* selection. Find the closest one, in the following preference order:
|
||||||
|
*
|
||||||
|
* - Equality
|
||||||
|
* - Closer in size to the requested mode, but no larger
|
||||||
|
* - Closer in refresh rate to the requested mode.
|
||||||
|
*/
|
||||||
|
|
||||||
|
DisplayModePtr
|
||||||
|
xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired)
|
||||||
|
{
|
||||||
|
DisplayModePtr best = NULL, scan = NULL;
|
||||||
|
|
||||||
|
for (scan = output->probed_modes; scan != NULL; scan = scan->next)
|
||||||
|
{
|
||||||
|
/* If there's an exact match, we're done. */
|
||||||
|
if (xf86ModesEqual(scan, desired)) {
|
||||||
|
best = desired;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reject if it's larger than the desired mode. */
|
||||||
|
if (scan->HDisplay > desired->HDisplay ||
|
||||||
|
scan->VDisplay > desired->VDisplay)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we haven't picked a best mode yet, use the first
|
||||||
|
* one in the size range
|
||||||
|
*/
|
||||||
|
if (best == NULL)
|
||||||
|
{
|
||||||
|
best = scan;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Find if it's closer to the right size than the current best
|
||||||
|
* option.
|
||||||
|
*/
|
||||||
|
if ((scan->HDisplay > best->HDisplay &&
|
||||||
|
scan->VDisplay >= best->VDisplay) ||
|
||||||
|
(scan->HDisplay >= best->HDisplay &&
|
||||||
|
scan->VDisplay > best->VDisplay))
|
||||||
|
{
|
||||||
|
best = scan;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Find if it's still closer to the right refresh than the current
|
||||||
|
* best resolution.
|
||||||
|
*/
|
||||||
|
if (scan->HDisplay == best->HDisplay &&
|
||||||
|
scan->VDisplay == best->VDisplay &&
|
||||||
|
(fabs(scan->VRefresh - desired->VRefresh) <
|
||||||
|
fabs(best->VRefresh - desired->VRefresh))) {
|
||||||
|
best = scan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return best;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When setting a mode through XFree86-VidModeExtension or XFree86-DGA,
|
||||||
|
* take the specified mode and apply it to the crtc connected to the compat
|
||||||
|
* output. Then, find similar modes for the other outputs, as with the
|
||||||
|
* InitialConfiguration code above. The goal is to clone the desired
|
||||||
|
* mode across all outputs that are currently active.
|
||||||
|
*/
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation)
|
||||||
|
{
|
||||||
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
|
Bool ok = TRUE;
|
||||||
|
xf86OutputPtr compat_output = config->output[config->compat_output];
|
||||||
|
DisplayModePtr compat_mode;
|
||||||
|
int c;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Let the compat output drive the final mode selection
|
||||||
|
*/
|
||||||
|
compat_mode = xf86OutputFindClosestMode (compat_output, desired);
|
||||||
|
if (compat_mode)
|
||||||
|
desired = compat_mode;
|
||||||
|
|
||||||
|
for (c = 0; c < config->num_crtc; c++)
|
||||||
|
{
|
||||||
|
xf86CrtcPtr crtc = config->crtc[c];
|
||||||
|
DisplayModePtr crtc_mode = NULL;
|
||||||
|
int o;
|
||||||
|
|
||||||
|
if (!crtc->enabled)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for (o = 0; o < config->num_output; o++)
|
||||||
|
{
|
||||||
|
xf86OutputPtr output = config->output[o];
|
||||||
|
DisplayModePtr output_mode;
|
||||||
|
|
||||||
|
/* skip outputs not on this crtc */
|
||||||
|
if (output->crtc != crtc)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (crtc_mode)
|
||||||
|
{
|
||||||
|
output_mode = xf86OutputFindClosestMode (output, crtc_mode);
|
||||||
|
if (output_mode != crtc_mode)
|
||||||
|
output->crtc = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
crtc_mode = xf86OutputFindClosestMode (output, desired);
|
||||||
|
}
|
||||||
|
if (!xf86CrtcSetMode (crtc, crtc_mode, rotation, 0, 0))
|
||||||
|
ok = FALSE;
|
||||||
|
else
|
||||||
|
crtc->desiredMode = *crtc_mode;
|
||||||
|
}
|
||||||
|
xf86DisableUnusedFunctions(pScrn);
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the DPMS power mode of all outputs and CRTCs.
|
* Set the DPMS power mode of all outputs and CRTCs.
|
||||||
*
|
*
|
||||||
|
@ -1738,3 +1982,12 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus)
|
||||||
|
|
||||||
return xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus);
|
return xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *_xf86ConnectorNames[] = { "None", "VGA", "DVI-I", "DVI-D",
|
||||||
|
"DVI-A", "Composite", "S-Video",
|
||||||
|
"Component", "LFP", "Proprietary" };
|
||||||
|
char *
|
||||||
|
xf86ConnectorGetName(xf86ConnectorType connector)
|
||||||
|
{
|
||||||
|
return _xf86ConnectorNames[connector];
|
||||||
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "xf86Rename.h"
|
#include "xf86Rename.h"
|
||||||
#endif
|
#endif
|
||||||
#include "xf86Modes.h"
|
#include "xf86Modes.h"
|
||||||
|
#include "xf86Cursor.h"
|
||||||
#include "damage.h"
|
#include "damage.h"
|
||||||
|
|
||||||
/* Compat definitions for older X Servers. */
|
/* Compat definitions for older X Servers. */
|
||||||
|
@ -37,10 +38,27 @@
|
||||||
#ifndef M_T_DRIVER
|
#ifndef M_T_DRIVER
|
||||||
#define M_T_DRIVER 0x40
|
#define M_T_DRIVER 0x40
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef HARDWARE_CURSOR_ARGB
|
||||||
|
#define HARDWARE_CURSOR_ARGB 0x00004000
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr;
|
typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr;
|
||||||
typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr;
|
typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr;
|
||||||
|
|
||||||
|
/* define a standard for connector types */
|
||||||
|
typedef enum _xf86ConnectorType {
|
||||||
|
XF86ConnectorNone,
|
||||||
|
XF86ConnectorVGA,
|
||||||
|
XF86ConnectorDVI_I,
|
||||||
|
XF86ConnectorDVI_D,
|
||||||
|
XF86ConnectorDVI_A,
|
||||||
|
XF86ConnectorComposite,
|
||||||
|
XF86ConnectorSvideo,
|
||||||
|
XF86ConnectorComponent,
|
||||||
|
XF86ConnectorLFP,
|
||||||
|
XF86ConnectorProprietary,
|
||||||
|
} xf86ConnectorType;
|
||||||
|
|
||||||
typedef enum _xf86OutputStatus {
|
typedef enum _xf86OutputStatus {
|
||||||
XF86OutputStatusConnected,
|
XF86OutputStatusConnected,
|
||||||
XF86OutputStatusDisconnected,
|
XF86OutputStatusDisconnected,
|
||||||
|
@ -96,6 +114,12 @@ typedef struct _xf86CrtcFuncs {
|
||||||
DisplayModePtr mode,
|
DisplayModePtr mode,
|
||||||
DisplayModePtr adjusted_mode);
|
DisplayModePtr adjusted_mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare CRTC for an upcoming mode set.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
(*prepare)(xf86CrtcPtr crtc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for setting up a video mode after fixups have been made.
|
* Callback for setting up a video mode after fixups have been made.
|
||||||
*/
|
*/
|
||||||
|
@ -105,6 +129,12 @@ typedef struct _xf86CrtcFuncs {
|
||||||
DisplayModePtr adjusted_mode,
|
DisplayModePtr adjusted_mode,
|
||||||
int x, int y);
|
int x, int y);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Commit mode changes to a CRTC
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
(*commit)(xf86CrtcPtr crtc);
|
||||||
|
|
||||||
/* Set the color ramps for the CRTC to the given values. */
|
/* Set the color ramps for the CRTC to the given values. */
|
||||||
void
|
void
|
||||||
(*gamma_set)(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
|
(*gamma_set)(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
|
||||||
|
@ -128,6 +158,42 @@ typedef struct _xf86CrtcFuncs {
|
||||||
void
|
void
|
||||||
(*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data);
|
(*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cursor colors
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
(*set_cursor_colors) (xf86CrtcPtr crtc, int bg, int fg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cursor position
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
(*set_cursor_position) (xf86CrtcPtr crtc, int x, int y);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show cursor
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
(*show_cursor) (xf86CrtcPtr crtc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide cursor
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
(*hide_cursor) (xf86CrtcPtr crtc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load monochrome image
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
(*load_cursor_image) (xf86CrtcPtr crtc, CARD8 *image);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load ARGB image
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
(*load_cursor_argb) (xf86CrtcPtr crtc, CARD32 *image);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up driver-specific bits of the crtc
|
* Clean up driver-specific bits of the crtc
|
||||||
*/
|
*/
|
||||||
|
@ -148,12 +214,6 @@ struct _xf86Crtc {
|
||||||
*/
|
*/
|
||||||
Bool enabled;
|
Bool enabled;
|
||||||
|
|
||||||
/** Track whether cursor is within CRTC range */
|
|
||||||
Bool cursorInRange;
|
|
||||||
|
|
||||||
/** Track state of cursor associated with this CRTC */
|
|
||||||
Bool cursorShown;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Active mode
|
* Active mode
|
||||||
*
|
*
|
||||||
|
@ -206,6 +266,19 @@ struct _xf86Crtc {
|
||||||
#else
|
#else
|
||||||
void *randr_crtc;
|
void *randr_crtc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Current cursor is ARGB
|
||||||
|
*/
|
||||||
|
Bool cursor_argb;
|
||||||
|
/**
|
||||||
|
* Track whether cursor is within CRTC range
|
||||||
|
*/
|
||||||
|
Bool cursor_in_range;
|
||||||
|
/**
|
||||||
|
* Track state of cursor associated with this CRTC
|
||||||
|
*/
|
||||||
|
Bool cursor_shown;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _xf86OutputFuncs {
|
typedef struct _xf86OutputFuncs {
|
||||||
|
@ -263,6 +336,18 @@ typedef struct _xf86OutputFuncs {
|
||||||
DisplayModePtr mode,
|
DisplayModePtr mode,
|
||||||
DisplayModePtr adjusted_mode);
|
DisplayModePtr adjusted_mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback for preparing mode changes on an output
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
(*prepare)(xf86OutputPtr output);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback for committing mode changes on an output
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
(*commit)(xf86OutputPtr output);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for setting up a video mode after fixups have been made.
|
* Callback for setting up a video mode after fixups have been made.
|
||||||
*
|
*
|
||||||
|
@ -444,7 +529,8 @@ typedef struct _xf86CrtcConfig {
|
||||||
int maxWidth, maxHeight;
|
int maxWidth, maxHeight;
|
||||||
|
|
||||||
/* For crtc-based rotation */
|
/* For crtc-based rotation */
|
||||||
DamagePtr rotationDamage;
|
DamagePtr rotation_damage;
|
||||||
|
Bool rotation_damage_registered;
|
||||||
|
|
||||||
/* DGA */
|
/* DGA */
|
||||||
unsigned int dga_flags;
|
unsigned int dga_flags;
|
||||||
|
@ -456,6 +542,14 @@ typedef struct _xf86CrtcConfig {
|
||||||
|
|
||||||
const xf86CrtcConfigFuncsRec *funcs;
|
const xf86CrtcConfigFuncsRec *funcs;
|
||||||
|
|
||||||
|
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||||
|
|
||||||
|
/* Cursor information */
|
||||||
|
xf86CursorInfoPtr cursor_info;
|
||||||
|
CursorPtr cursor;
|
||||||
|
CARD8 *cursor_image;
|
||||||
|
Bool cursor_on;
|
||||||
|
CARD32 cursor_fg, cursor_bg;
|
||||||
} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
|
} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
|
||||||
|
|
||||||
extern int xf86CrtcConfigPrivateIndex;
|
extern int xf86CrtcConfigPrivateIndex;
|
||||||
|
@ -486,25 +580,6 @@ void
|
||||||
xf86CrtcDestroy (xf86CrtcPtr crtc);
|
xf86CrtcDestroy (xf86CrtcPtr crtc);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allocate a crtc for the specified output
|
|
||||||
*
|
|
||||||
* Find a currently unused CRTC which is suitable for
|
|
||||||
* the specified output
|
|
||||||
*/
|
|
||||||
|
|
||||||
xf86CrtcPtr
|
|
||||||
xf86AllocCrtc (xf86OutputPtr output);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Free a crtc
|
|
||||||
*
|
|
||||||
* Mark the crtc as unused by any outputs
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
xf86FreeCrtc (xf86CrtcPtr crtc);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the given video mode on the given crtc
|
* Sets the given video mode on the given crtc
|
||||||
*/
|
*/
|
||||||
|
@ -544,6 +619,9 @@ xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY);
|
||||||
void
|
void
|
||||||
xf86SetScrnInfoModes (ScrnInfoPtr pScrn);
|
xf86SetScrnInfoModes (ScrnInfoPtr pScrn);
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86CrtcScreenInit (ScreenPtr pScreen);
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
xf86InitialConfiguration (ScrnInfoPtr pScrn, Bool canGrow);
|
xf86InitialConfiguration (ScrnInfoPtr pScrn, Bool canGrow);
|
||||||
|
|
||||||
|
@ -556,6 +634,12 @@ xf86SaveScreen(ScreenPtr pScreen, int mode);
|
||||||
void
|
void
|
||||||
xf86DisableUnusedFunctions(ScrnInfoPtr pScrn);
|
xf86DisableUnusedFunctions(ScrnInfoPtr pScrn);
|
||||||
|
|
||||||
|
DisplayModePtr
|
||||||
|
xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired);
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the EDID information for the specified output
|
* Set the EDID information for the specified output
|
||||||
*/
|
*/
|
||||||
|
@ -594,4 +678,55 @@ xf86DiDGAReInit (ScreenPtr pScreen);
|
||||||
void
|
void
|
||||||
xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen);
|
xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get a standard string name for a connector type
|
||||||
|
*/
|
||||||
|
char *
|
||||||
|
xf86ConnectorGetName(xf86ConnectorType connector);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Using the desired mode information in each crtc, set
|
||||||
|
* modes (used in EnterVT functions, or at server startup)
|
||||||
|
*/
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86SetDesiredModes (ScrnInfoPtr pScrn);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the CRTC-based cursor code. CRTC function vectors must
|
||||||
|
* contain relevant cursor setting functions.
|
||||||
|
*
|
||||||
|
* Driver should call this from ScreenInit function
|
||||||
|
*/
|
||||||
|
Bool
|
||||||
|
xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when anything on the screen is reconfigured.
|
||||||
|
*
|
||||||
|
* Reloads cursor images as needed, then adjusts cursor positions.
|
||||||
|
*
|
||||||
|
* Driver should call this from crtc commit function.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xf86_reload_cursors (ScreenPtr screen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called from EnterVT to turn the cursors back on
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xf86_show_cursors (ScrnInfoPtr scrn);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by the driver to turn cursors off
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xf86_hide_cursors (ScrnInfoPtr scrn);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clean up CRTC-based cursor code. Driver must call this at CloseScreen time.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xf86_cursors_fini (ScreenPtr screen);
|
||||||
|
|
||||||
#endif /* _XF86CRTC_H_ */
|
#endif /* _XF86CRTC_H_ */
|
||||||
|
|
|
@ -0,0 +1,608 @@
|
||||||
|
/*
|
||||||
|
* Copyright © 2007 Keith Packard
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
* documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
* the above copyright notice appear in all copies and that both that copyright
|
||||||
|
* notice and this permission notice appear in supporting documentation, and
|
||||||
|
* that the name of the copyright holders not be used in advertising or
|
||||||
|
* publicity pertaining to distribution of the software without specific,
|
||||||
|
* written prior permission. The copyright holders make no representations
|
||||||
|
* about the suitability of this software for any purpose. It is provided "as
|
||||||
|
* is" without express or implied warranty.
|
||||||
|
*
|
||||||
|
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||||
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||||
|
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||||
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||||
|
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||||
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
|
* OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_XORG_CONFIG_H
|
||||||
|
#include <xorg-config.h>
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "xf86.h"
|
||||||
|
#include "xf86DDC.h"
|
||||||
|
#include "xf86Crtc.h"
|
||||||
|
#include "xf86Modes.h"
|
||||||
|
#include "xf86RandR12.h"
|
||||||
|
#include "X11/extensions/render.h"
|
||||||
|
#define DPMS_SERVER
|
||||||
|
#include "X11/extensions/dpms.h"
|
||||||
|
#include "X11/Xatom.h"
|
||||||
|
#ifdef RENDER
|
||||||
|
#include "picturestr.h"
|
||||||
|
#endif
|
||||||
|
#include "cursorstr.h"
|
||||||
|
#include "inputstr.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Given a screen coordinate, rotate back to a cursor source coordinate
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xf86_crtc_rotate_coord (Rotation rotation,
|
||||||
|
int width,
|
||||||
|
int height,
|
||||||
|
int x_dst,
|
||||||
|
int y_dst,
|
||||||
|
int *x_src,
|
||||||
|
int *y_src)
|
||||||
|
{
|
||||||
|
if (rotation & RR_Reflect_X)
|
||||||
|
x_dst = width - x_dst - 1;
|
||||||
|
if (rotation & RR_Reflect_Y)
|
||||||
|
y_dst = height - y_dst - 1;
|
||||||
|
|
||||||
|
switch (rotation & 0xf) {
|
||||||
|
case RR_Rotate_0:
|
||||||
|
*x_src = x_dst;
|
||||||
|
*y_src = y_dst;
|
||||||
|
break;
|
||||||
|
case RR_Rotate_90:
|
||||||
|
*x_src = height - y_dst - 1;
|
||||||
|
*y_src = x_dst;
|
||||||
|
break;
|
||||||
|
case RR_Rotate_180:
|
||||||
|
*x_src = width - x_dst - 1;
|
||||||
|
*y_src = height - y_dst - 1;
|
||||||
|
break;
|
||||||
|
case RR_Rotate_270:
|
||||||
|
*x_src = y_dst;
|
||||||
|
*y_src = width - x_dst - 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Convert an x coordinate to a position within the cursor bitmap
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
cursor_bitpos (int flags, int x, Bool mask)
|
||||||
|
{
|
||||||
|
if (flags & HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK)
|
||||||
|
mask = !mask;
|
||||||
|
if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED)
|
||||||
|
x = (x & ~3) | (3 - (x & 3));
|
||||||
|
if (flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST)
|
||||||
|
x = (x & ~7) | (7 - (x & 7));
|
||||||
|
if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1)
|
||||||
|
x = (x << 1) + mask;
|
||||||
|
else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8)
|
||||||
|
x = ((x & ~7) << 1) | (mask << 3) | (x & 7);
|
||||||
|
else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16)
|
||||||
|
x = ((x & ~15) << 1) | (mask << 4) | (x & 15);
|
||||||
|
else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32)
|
||||||
|
x = ((x & ~31) << 1) | (mask << 5) | (x & 31);
|
||||||
|
else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64)
|
||||||
|
x = ((x & ~63) << 1) | (mask << 6) | (x & 63);
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fetch one bit from a cursor bitmap
|
||||||
|
*/
|
||||||
|
static CARD8
|
||||||
|
get_bit (CARD8 *image, int stride, int flags, int x, int y, Bool mask)
|
||||||
|
{
|
||||||
|
x = cursor_bitpos (flags, x, mask);
|
||||||
|
image += y * stride;
|
||||||
|
return (image[(x >> 3)] >> (x & 7)) & 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set one bit in a cursor bitmap
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
set_bit (CARD8 *image, int stride, int flags, int x, int y, Bool mask)
|
||||||
|
{
|
||||||
|
x = cursor_bitpos (flags, x, mask);
|
||||||
|
image += y * stride;
|
||||||
|
image[(x >> 3)] |= 1 << (x & 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Load a two color cursor into a driver that supports only ARGB cursors
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xf86_crtc_convert_cursor_to_argb (xf86CrtcPtr crtc, unsigned char *src)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = crtc->scrn;
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||||
|
CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image;
|
||||||
|
int x, y;
|
||||||
|
int xin, yin;
|
||||||
|
int stride = cursor_info->MaxWidth >> 2;
|
||||||
|
int flags = cursor_info->Flags;
|
||||||
|
CARD32 bits;
|
||||||
|
|
||||||
|
#ifdef ARGB_CURSOR
|
||||||
|
crtc->cursor_argb = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (y = 0; y < cursor_info->MaxHeight; y++)
|
||||||
|
for (x = 0; x < cursor_info->MaxWidth; x++)
|
||||||
|
{
|
||||||
|
xf86_crtc_rotate_coord (crtc->rotation,
|
||||||
|
cursor_info->MaxWidth,
|
||||||
|
cursor_info->MaxHeight,
|
||||||
|
x, y, &xin, &yin);
|
||||||
|
if (get_bit (src, stride, flags, xin, yin, TRUE) ==
|
||||||
|
((flags & HARDWARE_CURSOR_INVERT_MASK) == 0))
|
||||||
|
{
|
||||||
|
if (get_bit (src, stride, flags, xin, yin, FALSE))
|
||||||
|
bits = xf86_config->cursor_fg;
|
||||||
|
else
|
||||||
|
bits = xf86_config->cursor_bg;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
bits = 0;
|
||||||
|
cursor_image[y * cursor_info->MaxWidth + x] = bits;
|
||||||
|
}
|
||||||
|
crtc->funcs->load_cursor_argb (crtc, cursor_image);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the colors for a two-color cursor (ignore for ARGB cursors)
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg)
|
||||||
|
{
|
||||||
|
ScreenPtr screen = scrn->pScreen;
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
CursorPtr cursor = xf86_config->cursor;
|
||||||
|
int c;
|
||||||
|
CARD8 *bits = cursor ? cursor->devPriv[screen->myNum] : NULL;
|
||||||
|
|
||||||
|
/* Save ARGB versions of these colors */
|
||||||
|
xf86_config->cursor_fg = (CARD32) fg | 0xff000000;
|
||||||
|
xf86_config->cursor_bg = (CARD32) bg | 0xff000000;
|
||||||
|
|
||||||
|
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||||
|
{
|
||||||
|
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||||
|
|
||||||
|
if (crtc->enabled && !crtc->cursor_argb)
|
||||||
|
{
|
||||||
|
if (crtc->funcs->load_cursor_image)
|
||||||
|
crtc->funcs->set_cursor_colors (crtc, bg, fg);
|
||||||
|
else if (bits)
|
||||||
|
xf86_crtc_convert_cursor_to_argb (crtc, bits);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86_crtc_hide_cursor (xf86CrtcPtr crtc)
|
||||||
|
{
|
||||||
|
if (crtc->cursor_shown)
|
||||||
|
{
|
||||||
|
crtc->funcs->hide_cursor (crtc);
|
||||||
|
crtc->cursor_shown = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86_hide_cursors (ScrnInfoPtr scrn)
|
||||||
|
{
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
int c;
|
||||||
|
|
||||||
|
xf86_config->cursor_on = FALSE;
|
||||||
|
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||||
|
{
|
||||||
|
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||||
|
|
||||||
|
if (crtc->enabled)
|
||||||
|
xf86_crtc_hide_cursor (crtc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86_crtc_show_cursor (xf86CrtcPtr crtc)
|
||||||
|
{
|
||||||
|
if (!crtc->cursor_shown && crtc->cursor_in_range)
|
||||||
|
{
|
||||||
|
crtc->funcs->show_cursor (crtc);
|
||||||
|
crtc->cursor_shown = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86_show_cursors (ScrnInfoPtr scrn)
|
||||||
|
{
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
int c;
|
||||||
|
|
||||||
|
xf86_config->cursor_on = TRUE;
|
||||||
|
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||||
|
{
|
||||||
|
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||||
|
|
||||||
|
if (crtc->enabled)
|
||||||
|
xf86_crtc_show_cursor (crtc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = crtc->scrn;
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||||
|
DisplayModePtr mode = &crtc->mode;
|
||||||
|
int x_temp;
|
||||||
|
int y_temp;
|
||||||
|
Bool in_range;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Move to crtc coordinate space
|
||||||
|
*/
|
||||||
|
x -= crtc->x;
|
||||||
|
y -= crtc->y;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Rotate
|
||||||
|
*/
|
||||||
|
switch ((crtc->rotation) & 0xf) {
|
||||||
|
case RR_Rotate_0:
|
||||||
|
break;
|
||||||
|
case RR_Rotate_90:
|
||||||
|
x_temp = y;
|
||||||
|
y_temp = mode->VDisplay - cursor_info->MaxWidth - x;
|
||||||
|
x = x_temp;
|
||||||
|
y = y_temp;
|
||||||
|
break;
|
||||||
|
case RR_Rotate_180:
|
||||||
|
x_temp = mode->HDisplay - cursor_info->MaxWidth - x;
|
||||||
|
y_temp = mode->VDisplay - cursor_info->MaxHeight - y;
|
||||||
|
x = x_temp;
|
||||||
|
y = y_temp;
|
||||||
|
break;
|
||||||
|
case RR_Rotate_270:
|
||||||
|
x_temp = mode->HDisplay - cursor_info->MaxHeight - y;
|
||||||
|
y_temp = x;
|
||||||
|
x = x_temp;
|
||||||
|
y = y_temp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Reflect
|
||||||
|
*/
|
||||||
|
if (crtc->rotation & RR_Reflect_X)
|
||||||
|
x = mode->HDisplay - cursor_info->MaxWidth - x;
|
||||||
|
if (crtc->rotation & RR_Reflect_Y)
|
||||||
|
y = mode->VDisplay - cursor_info->MaxHeight - y;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disable the cursor when it is outside the viewport
|
||||||
|
*/
|
||||||
|
in_range = TRUE;
|
||||||
|
if (x >= mode->HDisplay || y >= mode->VDisplay ||
|
||||||
|
x <= -cursor_info->MaxWidth || y <= -cursor_info->MaxHeight)
|
||||||
|
{
|
||||||
|
in_range = FALSE;
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
crtc->cursor_in_range = in_range;
|
||||||
|
|
||||||
|
if (in_range)
|
||||||
|
{
|
||||||
|
crtc->funcs->set_cursor_position (crtc, x, y);
|
||||||
|
xf86_crtc_show_cursor (crtc);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
xf86_crtc_hide_cursor (crtc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86_set_cursor_position (ScrnInfoPtr scrn, int x, int y)
|
||||||
|
{
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
int c;
|
||||||
|
|
||||||
|
/* undo what xf86HWCurs did to the coordinates */
|
||||||
|
x += scrn->frameX0;
|
||||||
|
y += scrn->frameY0;
|
||||||
|
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||||
|
{
|
||||||
|
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||||
|
|
||||||
|
if (crtc->enabled)
|
||||||
|
xf86_crtc_set_cursor_position (crtc, x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Load a two-color cursor into a crtc, performing rotation as needed
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xf86_crtc_load_cursor_image (xf86CrtcPtr crtc, CARD8 *src)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = crtc->scrn;
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||||
|
CARD8 *cursor_image;
|
||||||
|
|
||||||
|
#ifdef ARGB_CURSOR
|
||||||
|
crtc->cursor_argb = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (crtc->rotation == RR_Rotate_0)
|
||||||
|
cursor_image = src;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
int xin, yin;
|
||||||
|
int stride = cursor_info->MaxWidth >> 2;
|
||||||
|
int flags = cursor_info->Flags;
|
||||||
|
|
||||||
|
cursor_image = xf86_config->cursor_image;
|
||||||
|
memset(cursor_image, 0, cursor_info->MaxWidth * stride);
|
||||||
|
|
||||||
|
for (y = 0; y < cursor_info->MaxHeight; y++)
|
||||||
|
for (x = 0; x < cursor_info->MaxWidth; x++)
|
||||||
|
{
|
||||||
|
xf86_crtc_rotate_coord (crtc->rotation,
|
||||||
|
cursor_info->MaxWidth,
|
||||||
|
cursor_info->MaxHeight,
|
||||||
|
x, y, &xin, &yin);
|
||||||
|
if (get_bit(src, stride, flags, xin, yin, FALSE))
|
||||||
|
set_bit(cursor_image, stride, flags, x, y, FALSE);
|
||||||
|
if (get_bit(src, stride, flags, xin, yin, TRUE))
|
||||||
|
set_bit(cursor_image, stride, flags, x, y, TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
crtc->funcs->load_cursor_image (crtc, cursor_image);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Load a cursor image into all active CRTCs
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xf86_load_cursor_image (ScrnInfoPtr scrn, unsigned char *src)
|
||||||
|
{
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
int c;
|
||||||
|
|
||||||
|
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||||
|
{
|
||||||
|
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||||
|
|
||||||
|
if (crtc->enabled)
|
||||||
|
{
|
||||||
|
if (crtc->funcs->load_cursor_image)
|
||||||
|
xf86_crtc_load_cursor_image (crtc, src);
|
||||||
|
else if (crtc->funcs->load_cursor_argb)
|
||||||
|
xf86_crtc_convert_cursor_to_argb (crtc, src);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Bool
|
||||||
|
xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||||
|
|
||||||
|
xf86_config->cursor = cursor;
|
||||||
|
|
||||||
|
if (cursor->bits->width > cursor_info->MaxWidth ||
|
||||||
|
cursor->bits->height> cursor_info->MaxHeight)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Bool
|
||||||
|
xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||||
|
|
||||||
|
xf86_config->cursor = cursor;
|
||||||
|
|
||||||
|
/* Make sure ARGB support is available */
|
||||||
|
if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (cursor->bits->width > cursor_info->MaxWidth ||
|
||||||
|
cursor->bits->height> cursor_info->MaxHeight)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86_crtc_load_cursor_argb (xf86CrtcPtr crtc, CursorPtr cursor)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = crtc->scrn;
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||||
|
CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image;
|
||||||
|
CARD32 *cursor_source = (CARD32 *) cursor->bits->argb;
|
||||||
|
int x, y;
|
||||||
|
int xin, yin;
|
||||||
|
CARD32 bits;
|
||||||
|
int source_width = cursor->bits->width;
|
||||||
|
int source_height = cursor->bits->height;
|
||||||
|
int image_width = cursor_info->MaxWidth;
|
||||||
|
int image_height = cursor_info->MaxHeight;
|
||||||
|
|
||||||
|
for (y = 0; y < image_height; y++)
|
||||||
|
for (x = 0; x < image_width; x++)
|
||||||
|
{
|
||||||
|
xf86_crtc_rotate_coord (crtc->rotation, image_width, image_height,
|
||||||
|
x, y, &xin, &yin);
|
||||||
|
if (xin < source_width && yin < source_height)
|
||||||
|
bits = cursor_source[yin * source_width + xin];
|
||||||
|
else
|
||||||
|
bits = 0;
|
||||||
|
cursor_image[y * image_width + x] = bits;
|
||||||
|
}
|
||||||
|
|
||||||
|
crtc->funcs->load_cursor_argb (crtc, cursor_image);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86_load_cursor_argb (ScrnInfoPtr scrn, CursorPtr cursor)
|
||||||
|
{
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
int c;
|
||||||
|
|
||||||
|
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||||
|
{
|
||||||
|
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||||
|
|
||||||
|
if (crtc->enabled)
|
||||||
|
xf86_crtc_load_cursor_argb (crtc, cursor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool
|
||||||
|
xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
xf86CursorInfoPtr cursor_info;
|
||||||
|
|
||||||
|
cursor_info = xf86CreateCursorInfoRec();
|
||||||
|
if (!cursor_info)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
xf86_config->cursor_image = xalloc (max_width * max_height * 4);
|
||||||
|
|
||||||
|
if (!xf86_config->cursor_image)
|
||||||
|
{
|
||||||
|
xf86DestroyCursorInfoRec (cursor_info);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
xf86_config->cursor_info = cursor_info;
|
||||||
|
|
||||||
|
cursor_info->MaxWidth = max_width;
|
||||||
|
cursor_info->MaxHeight = max_height;
|
||||||
|
cursor_info->Flags = flags;
|
||||||
|
|
||||||
|
cursor_info->SetCursorColors = xf86_set_cursor_colors;
|
||||||
|
cursor_info->SetCursorPosition = xf86_set_cursor_position;
|
||||||
|
cursor_info->LoadCursorImage = xf86_load_cursor_image;
|
||||||
|
cursor_info->HideCursor = xf86_hide_cursors;
|
||||||
|
cursor_info->ShowCursor = xf86_show_cursors;
|
||||||
|
cursor_info->UseHWCursor = xf86_use_hw_cursor;
|
||||||
|
#ifdef ARGB_CURSOR
|
||||||
|
if (flags & HARDWARE_CURSOR_ARGB)
|
||||||
|
{
|
||||||
|
cursor_info->UseHWCursorARGB = xf86_use_hw_cursor_argb;
|
||||||
|
cursor_info->LoadCursorARGB = xf86_load_cursor_argb;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
xf86_config->cursor = NULL;
|
||||||
|
xf86_hide_cursors (scrn);
|
||||||
|
|
||||||
|
return xf86InitCursor (screen, cursor_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when anything on the screen is reconfigured.
|
||||||
|
*
|
||||||
|
* Reloads cursor images as needed, then adjusts cursor positions
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86_reload_cursors (ScreenPtr screen)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn;
|
||||||
|
xf86CrtcConfigPtr xf86_config;
|
||||||
|
xf86CursorInfoPtr cursor_info;
|
||||||
|
CursorPtr cursor;
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
/* initial mode setting will not have set a screen yet */
|
||||||
|
if (!screen)
|
||||||
|
return;
|
||||||
|
scrn = xf86Screens[screen->myNum];
|
||||||
|
xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
|
||||||
|
/* make sure the cursor code has been initialized */
|
||||||
|
cursor_info = xf86_config->cursor_info;
|
||||||
|
if (!cursor_info)
|
||||||
|
return;
|
||||||
|
|
||||||
|
cursor = xf86_config->cursor;
|
||||||
|
GetSpritePosition (inputInfo.pointer, &x, &y);
|
||||||
|
if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
|
||||||
|
(*cursor_info->HideCursor)(scrn);
|
||||||
|
|
||||||
|
if (cursor)
|
||||||
|
{
|
||||||
|
#ifdef ARGB_CURSOR
|
||||||
|
if (cursor->bits->argb && cursor_info->LoadCursorARGB)
|
||||||
|
(*cursor_info->LoadCursorARGB) (scrn, cursor);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
(*cursor_info->LoadCursorImage)(cursor_info->pScrn,
|
||||||
|
cursor->devPriv[screen->myNum]);
|
||||||
|
|
||||||
|
(*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
|
||||||
|
(*cursor_info->ShowCursor)(cursor_info->pScrn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clean up CRTC-based cursor code
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xf86_cursors_fini (ScreenPtr screen)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
|
||||||
|
if (xf86_config->cursor_info)
|
||||||
|
{
|
||||||
|
xf86DestroyCursorInfoRec (xf86_config->cursor_info);
|
||||||
|
xf86_config->cursor_info = NULL;
|
||||||
|
}
|
||||||
|
if (xf86_config->cursor_image)
|
||||||
|
{
|
||||||
|
xfree (xf86_config->cursor_image);
|
||||||
|
xf86_config->cursor_image = NULL;
|
||||||
|
}
|
||||||
|
}
|
|
@ -423,8 +423,28 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mmWidth = pScreen->mmWidth;
|
xf86OutputPtr output = config->output[config->compat_output];
|
||||||
mmHeight = pScreen->mmHeight;
|
xf86CrtcPtr crtc = output->crtc;
|
||||||
|
|
||||||
|
if (crtc && crtc->mode.HDisplay &&
|
||||||
|
output->mm_width && output->mm_height)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* If the output has a mode and a declared size, use that
|
||||||
|
* to scale the screen size
|
||||||
|
*/
|
||||||
|
DisplayModePtr mode = &crtc->mode;
|
||||||
|
mmWidth = output->mm_width * width / mode->HDisplay;
|
||||||
|
mmHeight = output->mm_height * height / mode->VDisplay;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Otherwise, just set the screen to 96dpi
|
||||||
|
*/
|
||||||
|
mmWidth = width * 25.4 / 96;
|
||||||
|
mmHeight = height * 25.4 / 96;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||||
"Setting screen physical size to %d x %d\n",
|
"Setting screen physical size to %d x %d\n",
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#define xf86CrtcDestroy XF86NAME(xf86CrtcDestroy)
|
#define xf86CrtcDestroy XF86NAME(xf86CrtcDestroy)
|
||||||
#define xf86CrtcInUse XF86NAME(xf86CrtcInUse)
|
#define xf86CrtcInUse XF86NAME(xf86CrtcInUse)
|
||||||
#define xf86CrtcRotate XF86NAME(xf86CrtcRotate)
|
#define xf86CrtcRotate XF86NAME(xf86CrtcRotate)
|
||||||
|
#define xf86CrtcScreenInit XF86NAME(xf86CrtcScreenInit)
|
||||||
#define xf86CrtcSetMode XF86NAME(xf86CrtcSetMode)
|
#define xf86CrtcSetMode XF86NAME(xf86CrtcSetMode)
|
||||||
#define xf86CrtcSetSizeRange XF86NAME(xf86CrtcSetSizeRange)
|
#define xf86CrtcSetSizeRange XF86NAME(xf86CrtcSetSizeRange)
|
||||||
#define xf86CVTMode XF86NAME(xf86CVTMode)
|
#define xf86CVTMode XF86NAME(xf86CVTMode)
|
||||||
|
@ -76,5 +77,8 @@
|
||||||
#define xf86CrtcSetScreenSubpixelOrder XF86NAME(xf86CrtcSetScreenSubpixelOrder)
|
#define xf86CrtcSetScreenSubpixelOrder XF86NAME(xf86CrtcSetScreenSubpixelOrder)
|
||||||
#define xf86ModeWidth XF86NAME(xf86ModeWidth)
|
#define xf86ModeWidth XF86NAME(xf86ModeWidth)
|
||||||
#define xf86ModeHeight XF86NAME(xf86ModeHeight)
|
#define xf86ModeHeight XF86NAME(xf86ModeHeight)
|
||||||
|
#define xf86OutputFindClosestMode XF86NAME(xf86OutputFindClosestMode)
|
||||||
|
#define xf86SetSingleMode XF86NAME(xf86SetSingleMode)
|
||||||
|
#define xf86SetDesiredModes XF86NAME(xf86SetDesiredModes)
|
||||||
|
|
||||||
#endif /* _XF86RENAME_H_ */
|
#endif /* _XF86RENAME_H_ */
|
||||||
|
|
|
@ -69,31 +69,44 @@ compWindowFormat (WindowPtr pWin)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xf86RotateBox (BoxPtr dst, BoxPtr src, Rotation rotation,
|
xf86TranslateBox (BoxPtr b, int dx, int dy)
|
||||||
|
{
|
||||||
|
b->x1 += dx;
|
||||||
|
b->y1 += dy;
|
||||||
|
b->x2 += dx;
|
||||||
|
b->y2 += dy;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86TransformBox (BoxPtr dst, BoxPtr src, Rotation rotation,
|
||||||
|
int xoff, int yoff,
|
||||||
int dest_width, int dest_height)
|
int dest_width, int dest_height)
|
||||||
{
|
{
|
||||||
|
BoxRec stmp = *src;
|
||||||
|
|
||||||
|
xf86TranslateBox (&stmp, -xoff, -yoff);
|
||||||
switch (rotation & 0xf) {
|
switch (rotation & 0xf) {
|
||||||
default:
|
default:
|
||||||
case RR_Rotate_0:
|
case RR_Rotate_0:
|
||||||
*dst = *src;
|
*dst = stmp;
|
||||||
break;
|
break;
|
||||||
case RR_Rotate_90:
|
case RR_Rotate_90:
|
||||||
dst->x1 = src->y1;
|
dst->x1 = stmp.y1;
|
||||||
dst->y1 = dest_height - src->x2;
|
dst->y1 = dest_height - stmp.x2;
|
||||||
dst->x2 = src->y2;
|
dst->x2 = stmp.y2;
|
||||||
dst->y2 = dest_height - src->x1;
|
dst->y2 = dest_height - stmp.x1;
|
||||||
break;
|
break;
|
||||||
case RR_Rotate_180:
|
case RR_Rotate_180:
|
||||||
dst->x1 = dest_width - src->x2;
|
dst->x1 = dest_width - stmp.x2;
|
||||||
dst->y1 = dest_height - src->y2;
|
dst->y1 = dest_height - stmp.y2;
|
||||||
dst->x2 = dest_width - src->x1;
|
dst->x2 = dest_width - stmp.x1;
|
||||||
dst->y2 = dest_height - src->y1;
|
dst->y2 = dest_height - stmp.y1;
|
||||||
break;
|
break;
|
||||||
case RR_Rotate_270:
|
case RR_Rotate_270:
|
||||||
dst->x1 = dest_width - src->y2;
|
dst->x1 = dest_width - stmp.y2;
|
||||||
dst->y1 = src->x1;
|
dst->y1 = stmp.x1;
|
||||||
dst->y2 = src->x2;
|
dst->y2 = stmp.x2;
|
||||||
dst->x2 = dest_width - src->y1;
|
dst->x2 = dest_width - stmp.y1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (rotation & RR_Reflect_X) {
|
if (rotation & RR_Reflect_X) {
|
||||||
|
@ -130,10 +143,9 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
|
||||||
&include_inferiors,
|
&include_inferiors,
|
||||||
serverClient,
|
serverClient,
|
||||||
&error);
|
&error);
|
||||||
if (!src) {
|
if (!src)
|
||||||
ErrorF("couldn't create src pict\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
dst = CreatePicture (None,
|
dst = CreatePicture (None,
|
||||||
&dst_pixmap->drawable,
|
&dst_pixmap->drawable,
|
||||||
format,
|
format,
|
||||||
|
@ -141,10 +153,8 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
|
||||||
NULL,
|
NULL,
|
||||||
serverClient,
|
serverClient,
|
||||||
&error);
|
&error);
|
||||||
if (!dst) {
|
if (!dst)
|
||||||
ErrorF("couldn't create src pict\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
memset (&transform, '\0', sizeof (transform));
|
memset (&transform, '\0', sizeof (transform));
|
||||||
transform.matrix[2][2] = IntToxFixed(1);
|
transform.matrix[2][2] = IntToxFixed(1);
|
||||||
|
@ -185,16 +195,15 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
|
||||||
}
|
}
|
||||||
|
|
||||||
error = SetPictureTransform (src, &transform);
|
error = SetPictureTransform (src, &transform);
|
||||||
if (error) {
|
if (error)
|
||||||
ErrorF("Couldn't set transform\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
while (n--)
|
while (n--)
|
||||||
{
|
{
|
||||||
BoxRec dst_box;
|
BoxRec dst_box;
|
||||||
|
|
||||||
xf86RotateBox (&dst_box, b, crtc->rotation,
|
xf86TransformBox (&dst_box, b, crtc->rotation,
|
||||||
|
crtc->x, crtc->y,
|
||||||
crtc->mode.HDisplay, crtc->mode.VDisplay);
|
crtc->mode.HDisplay, crtc->mode.VDisplay);
|
||||||
CompositePicture (PictOpSrc,
|
CompositePicture (PictOpSrc,
|
||||||
src, NULL, dst,
|
src, NULL, dst,
|
||||||
|
@ -207,6 +216,24 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
|
||||||
FreePicture (dst, None);
|
FreePicture (dst, None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86CrtcDamageShadow (xf86CrtcPtr crtc)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr pScrn = crtc->scrn;
|
||||||
|
BoxRec damage_box;
|
||||||
|
RegionRec damage_region;
|
||||||
|
ScreenPtr pScreen = pScrn->pScreen;
|
||||||
|
|
||||||
|
damage_box.x1 = crtc->x;
|
||||||
|
damage_box.x2 = crtc->x + xf86ModeWidth (&crtc->mode, crtc->rotation);
|
||||||
|
damage_box.y1 = crtc->y;
|
||||||
|
damage_box.y2 = crtc->y + xf86ModeHeight (&crtc->mode, crtc->rotation);
|
||||||
|
REGION_INIT (pScreen, &damage_region, &damage_box, 1);
|
||||||
|
DamageDamageRegion (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||||
|
&damage_region);
|
||||||
|
REGION_UNINIT (pScreen, &damage_region);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xf86RotatePrepare (ScreenPtr pScreen)
|
xf86RotatePrepare (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
|
@ -220,25 +247,19 @@ xf86RotatePrepare (ScreenPtr pScreen)
|
||||||
|
|
||||||
if (crtc->rotatedData && !crtc->rotatedPixmap)
|
if (crtc->rotatedData && !crtc->rotatedPixmap)
|
||||||
{
|
{
|
||||||
BoxRec damage_box;
|
|
||||||
RegionRec damage_region;
|
|
||||||
|
|
||||||
crtc->rotatedPixmap = crtc->funcs->shadow_create (crtc,
|
crtc->rotatedPixmap = crtc->funcs->shadow_create (crtc,
|
||||||
crtc->rotatedData,
|
crtc->rotatedData,
|
||||||
crtc->mode.HDisplay,
|
crtc->mode.HDisplay,
|
||||||
crtc->mode.VDisplay);
|
crtc->mode.VDisplay);
|
||||||
|
if (!xf86_config->rotation_damage_registered)
|
||||||
|
{
|
||||||
/* Hook damage to screen pixmap */
|
/* Hook damage to screen pixmap */
|
||||||
DamageRegister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
DamageRegister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||||
xf86_config->rotationDamage);
|
xf86_config->rotation_damage);
|
||||||
|
xf86_config->rotation_damage_registered = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
damage_box.x1 = 0;
|
xf86CrtcDamageShadow (crtc);
|
||||||
damage_box.y1 = 0;
|
|
||||||
damage_box.x2 = xf86ModeWidth (&crtc->mode, crtc->rotation);
|
|
||||||
damage_box.y2 = xf86ModeHeight (&crtc->mode, crtc->rotation);
|
|
||||||
REGION_INIT (pScreen, &damage_region, &damage_box, 1);
|
|
||||||
DamageDamageRegion (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
|
||||||
&damage_region);
|
|
||||||
REGION_UNINIT (pScreen, &damage_region);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -248,7 +269,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
DamagePtr damage = xf86_config->rotationDamage;
|
DamagePtr damage = xf86_config->rotation_damage;
|
||||||
RegionPtr region;
|
RegionPtr region;
|
||||||
|
|
||||||
if (!damage)
|
if (!damage)
|
||||||
|
@ -317,13 +338,14 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
|
||||||
crtc->rotatedData = NULL;
|
crtc->rotatedData = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xf86_config->rotationDamage)
|
if (xf86_config->rotation_damage)
|
||||||
{
|
{
|
||||||
/* Free damage structure */
|
/* Free damage structure */
|
||||||
DamageUnregister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
DamageUnregister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||||
xf86_config->rotationDamage);
|
xf86_config->rotation_damage);
|
||||||
DamageDestroy (xf86_config->rotationDamage);
|
xf86_config->rotation_damage_registered = FALSE;
|
||||||
xf86_config->rotationDamage = NULL;
|
DamageDestroy (xf86_config->rotation_damage);
|
||||||
|
xf86_config->rotation_damage = NULL;
|
||||||
/* Free block/wakeup handler */
|
/* Free block/wakeup handler */
|
||||||
RemoveBlockAndWakeupHandlers (xf86RotateBlockHandler,
|
RemoveBlockAndWakeupHandlers (xf86RotateBlockHandler,
|
||||||
xf86RotateWakeupHandler,
|
xf86RotateWakeupHandler,
|
||||||
|
@ -357,15 +379,21 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
|
||||||
if (!shadowData)
|
if (!shadowData)
|
||||||
goto bail1;
|
goto bail1;
|
||||||
crtc->rotatedData = shadowData;
|
crtc->rotatedData = shadowData;
|
||||||
|
/* shadow will be damaged in xf86RotatePrepare */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* mark shadowed area as damaged so it will be repainted */
|
||||||
|
xf86CrtcDamageShadow (crtc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!xf86_config->rotationDamage)
|
if (!xf86_config->rotation_damage)
|
||||||
{
|
{
|
||||||
/* Create damage structure */
|
/* Create damage structure */
|
||||||
xf86_config->rotationDamage = DamageCreate (NULL, NULL,
|
xf86_config->rotation_damage = DamageCreate (NULL, NULL,
|
||||||
DamageReportNone,
|
DamageReportNone,
|
||||||
TRUE, pScreen, pScreen);
|
TRUE, pScreen, pScreen);
|
||||||
if (!xf86_config->rotationDamage)
|
if (!xf86_config->rotation_damage)
|
||||||
goto bail2;
|
goto bail2;
|
||||||
|
|
||||||
/* Assign block/wakeup handler */
|
/* Assign block/wakeup handler */
|
||||||
|
@ -379,8 +407,8 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
|
||||||
if (0)
|
if (0)
|
||||||
{
|
{
|
||||||
bail3:
|
bail3:
|
||||||
DamageDestroy (xf86_config->rotationDamage);
|
DamageDestroy (xf86_config->rotation_damage);
|
||||||
xf86_config->rotationDamage = NULL;
|
xf86_config->rotation_damage = NULL;
|
||||||
|
|
||||||
bail2:
|
bail2:
|
||||||
if (shadow || shadowData)
|
if (shadow || shadowData)
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
module_LTLIBRARIES = libramdac.la
|
noinst_LIBRARIES = libramdac.a
|
||||||
|
|
||||||
libramdac_la_LDFLAGS = -avoid-version
|
libramdac_a_SOURCES = xf86RamDac.c xf86RamDacCmap.c \
|
||||||
|
|
||||||
libramdac_la_SOURCES = xf86RamDacMod.c xf86RamDac.c xf86RamDacCmap.c \
|
|
||||||
xf86Cursor.c xf86HWCurs.c IBM.c BT.c TI.c \
|
xf86Cursor.c xf86HWCurs.c IBM.c BT.c TI.c \
|
||||||
xf86BitOrder.c
|
xf86BitOrder.c
|
||||||
|
|
||||||
|
|
|
@ -44,5 +44,8 @@ void xf86ForceHWCursor (ScreenPtr pScreen, Bool on);
|
||||||
#define HARDWARE_CURSOR_NIBBLE_SWAPPED 0x00000800
|
#define HARDWARE_CURSOR_NIBBLE_SWAPPED 0x00000800
|
||||||
#define HARDWARE_CURSOR_SHOW_TRANSPARENT 0x00001000
|
#define HARDWARE_CURSOR_SHOW_TRANSPARENT 0x00001000
|
||||||
#define HARDWARE_CURSOR_UPDATE_UNHIDDEN 0x00002000
|
#define HARDWARE_CURSOR_UPDATE_UNHIDDEN 0x00002000
|
||||||
|
#ifdef ARGB_CURSOR
|
||||||
|
#define HARDWARE_CURSOR_ARGB 0x00004000
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _XF86CURSOR_H */
|
#endif /* _XF86CURSOR_H */
|
||||||
|
|
|
@ -2082,7 +2082,7 @@ Implements the IMUL instruction and side effects.
|
||||||
void imul_long_direct(u32 *res_lo, u32* res_hi,u32 d, u32 s)
|
void imul_long_direct(u32 *res_lo, u32* res_hi,u32 d, u32 s)
|
||||||
{
|
{
|
||||||
#ifdef __HAS_LONG_LONG__
|
#ifdef __HAS_LONG_LONG__
|
||||||
s64 res = (s32)d * (s32)s;
|
s64 res = (s64)(s32)d * (s32)s;
|
||||||
|
|
||||||
*res_lo = (u32)res;
|
*res_lo = (u32)res;
|
||||||
*res_hi = (u32)(res >> 32);
|
*res_hi = (u32)(res >> 32);
|
||||||
|
@ -2174,7 +2174,7 @@ Implements the MUL instruction and side effects.
|
||||||
void mul_long(u32 s)
|
void mul_long(u32 s)
|
||||||
{
|
{
|
||||||
#ifdef __HAS_LONG_LONG__
|
#ifdef __HAS_LONG_LONG__
|
||||||
u64 res = (u32)M.x86.R_EAX * (u32)s;
|
u64 res = (u64)M.x86.R_EAX * s;
|
||||||
|
|
||||||
M.x86.R_EAX = (u32)res;
|
M.x86.R_EAX = (u32)res;
|
||||||
M.x86.R_EDX = (u32)(res >> 32);
|
M.x86.R_EDX = (u32)(res >> 32);
|
||||||
|
|
|
@ -120,12 +120,8 @@ xf4bppCreatePixmap( pScreen, width, height, depth )
|
||||||
pPixmap->devKind = size;
|
pPixmap->devKind = size;
|
||||||
pPixmap->refcnt = 1 ;
|
pPixmap->refcnt = 1 ;
|
||||||
size = height * pPixmap->devKind ;
|
size = height * pPixmap->devKind ;
|
||||||
#ifdef PIXPRIV
|
|
||||||
pPixmap->devPrivate.ptr = (pointer) (((CARD8*)pPixmap)
|
pPixmap->devPrivate.ptr = (pointer) (((CARD8*)pPixmap)
|
||||||
+ pScreen->totalPixmapSize);
|
+ pScreen->totalPixmapSize);
|
||||||
#else
|
|
||||||
pPixmap->devPrivate.ptr = (pointer) (pPixmap + 1);
|
|
||||||
#endif
|
|
||||||
bzero( (char *) pPixmap->devPrivate.ptr, size ) ;
|
bzero( (char *) pPixmap->devPrivate.ptr, size ) ;
|
||||||
return pPixmap ;
|
return pPixmap ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,9 +32,7 @@ is" without express or implied warranty.
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "XNPixmap.h"
|
#include "XNPixmap.h"
|
||||||
|
|
||||||
#ifdef PIXPRIV
|
|
||||||
int xnestPixmapPrivateIndex;
|
int xnestPixmapPrivateIndex;
|
||||||
#endif
|
|
||||||
|
|
||||||
PixmapPtr
|
PixmapPtr
|
||||||
xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
|
xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
|
||||||
|
@ -57,12 +55,8 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
|
||||||
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||||
pPixmap->refcnt = 1;
|
pPixmap->refcnt = 1;
|
||||||
pPixmap->devKind = PixmapBytePad(width, depth);
|
pPixmap->devKind = PixmapBytePad(width, depth);
|
||||||
#ifdef PIXPRIV
|
|
||||||
pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr =
|
pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr =
|
||||||
(pointer)((char *)pPixmap + pScreen->totalPixmapSize);
|
(pointer)((char *)pPixmap + pScreen->totalPixmapSize);
|
||||||
#else
|
|
||||||
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
|
|
||||||
#endif
|
|
||||||
if (width && height)
|
if (width && height)
|
||||||
xnestPixmapPriv(pPixmap)->pixmap =
|
xnestPixmapPriv(pPixmap)->pixmap =
|
||||||
XCreatePixmap(xnestDisplay,
|
XCreatePixmap(xnestDisplay,
|
||||||
|
|
|
@ -49,9 +49,7 @@ Window xnestScreenSaverWindows[MAXSCREENS];
|
||||||
extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
|
extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PIXPRIV
|
|
||||||
int xnestScreenGeneration = -1;
|
int xnestScreenGeneration = -1;
|
||||||
#endif
|
|
||||||
|
|
||||||
ScreenPtr
|
ScreenPtr
|
||||||
xnestScreen(Window window)
|
xnestScreen(Window window)
|
||||||
|
@ -154,7 +152,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
|
||||||
sizeof(xnestPrivGC))))
|
sizeof(xnestPrivGC))))
|
||||||
return False;
|
return False;
|
||||||
|
|
||||||
#ifdef PIXPRIV
|
|
||||||
if (xnestScreenGeneration != serverGeneration) {
|
if (xnestScreenGeneration != serverGeneration) {
|
||||||
if ((xnestPixmapPrivateIndex = AllocatePixmapPrivateIndex()) < 0)
|
if ((xnestPixmapPrivateIndex = AllocatePixmapPrivateIndex()) < 0)
|
||||||
return False;
|
return False;
|
||||||
|
@ -164,7 +161,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
|
||||||
if (!AllocatePixmapPrivate(pScreen,xnestPixmapPrivateIndex,
|
if (!AllocatePixmapPrivate(pScreen,xnestPixmapPrivateIndex,
|
||||||
sizeof (xnestPrivPixmap)))
|
sizeof (xnestPrivPixmap)))
|
||||||
return False;
|
return False;
|
||||||
#endif
|
|
||||||
visuals = (VisualPtr)xalloc(xnestNumVisuals * sizeof(VisualRec));
|
visuals = (VisualPtr)xalloc(xnestNumVisuals * sizeof(VisualRec));
|
||||||
numVisuals = 0;
|
numVisuals = 0;
|
||||||
|
|
||||||
|
|
|
@ -15,21 +15,14 @@ is" without express or implied warranty.
|
||||||
#ifndef XNESTPIXMAP_H
|
#ifndef XNESTPIXMAP_H
|
||||||
#define XNESTPIXMAP_H
|
#define XNESTPIXMAP_H
|
||||||
|
|
||||||
#ifdef PIXPRIV
|
|
||||||
extern int xnestPixmapPrivateIndex;
|
extern int xnestPixmapPrivateIndex;
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Pixmap pixmap;
|
Pixmap pixmap;
|
||||||
} xnestPrivPixmap;
|
} xnestPrivPixmap;
|
||||||
|
|
||||||
#ifdef PIXPRIV
|
|
||||||
#define xnestPixmapPriv(pPixmap) \
|
#define xnestPixmapPriv(pPixmap) \
|
||||||
((xnestPrivPixmap *)((pPixmap)->devPrivates[xnestPixmapPrivateIndex].ptr))
|
((xnestPrivPixmap *)((pPixmap)->devPrivates[xnestPixmapPrivateIndex].ptr))
|
||||||
#else
|
|
||||||
#define xnestPixmapPriv(pPixmap) \
|
|
||||||
((xnestPrivPixmap *)((pPixmap)->devPrivate.ptr))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
|
#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
xpcdir = @xpconfigdir@/C/print/models/CANONC3200-PS/fonts
|
xpcdir = @xpconfigdir@/C/print/models/CANONC3200-PS/fonts
|
||||||
|
|
||||||
parentdir = @xpconfigdir@/C/print/models/PSdefault/fonts
|
parentdir = ../../PSdefault/fonts
|
||||||
|
|
||||||
XPFONTS = \
|
XPFONTS = \
|
||||||
AvantGarde-Book.pmf \
|
AvantGarde-Book.pmf \
|
||||||
|
@ -19,10 +19,10 @@ XPFONTS = \
|
||||||
LubalinGraph-BookOblique.pmf \
|
LubalinGraph-BookOblique.pmf \
|
||||||
LubalinGraph-Demi.pmf \
|
LubalinGraph-Demi.pmf \
|
||||||
LubalinGraph-DemiOblique.pmf \
|
LubalinGraph-DemiOblique.pmf \
|
||||||
NewCenturySchlbk-Bold.pmf \
|
NewCentSchlbk-Bold.pmf \
|
||||||
NewCenturySchlbk-BoldItalic.pmf \
|
NewCentSchlbk-BoldItal.pmf \
|
||||||
NewCenturySchlbk-Italic.pmf \
|
NewCentSchlbk-Ital.pmf \
|
||||||
NewCenturySchlbk-Roman.pmf \
|
NewCentSchlbk-Roman.pmf \
|
||||||
Souvenir-Demi.pmf \
|
Souvenir-Demi.pmf \
|
||||||
Souvenir-DemiItalic.pmf \
|
Souvenir-DemiItalic.pmf \
|
||||||
Souvenir-Light.pmf \
|
Souvenir-Light.pmf \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
xpcdir = @xpconfigdir@/C/print/models/HPLJ4050-PS/fonts
|
xpcdir = @xpconfigdir@/C/print/models/HPLJ4050-PS/fonts
|
||||||
|
|
||||||
parentdir = @xpconfigdir@/C/print/models/PSdefault/fonts
|
parentdir = ../../PSdefault/fonts
|
||||||
|
|
||||||
XPFONTS = \
|
XPFONTS = \
|
||||||
AvantGarde-Book.pmf \
|
AvantGarde-Book.pmf \
|
||||||
|
@ -19,10 +19,10 @@ XPFONTS = \
|
||||||
LubalinGraph-BookOblique.pmf \
|
LubalinGraph-BookOblique.pmf \
|
||||||
LubalinGraph-Demi.pmf \
|
LubalinGraph-Demi.pmf \
|
||||||
LubalinGraph-DemiOblique.pmf \
|
LubalinGraph-DemiOblique.pmf \
|
||||||
NewCenturySchlbk-Bold.pmf \
|
NewCentSchlbk-Bold.pmf \
|
||||||
NewCenturySchlbk-BoldItalic.pmf \
|
NewCentSchlbk-BoldItal.pmf \
|
||||||
NewCenturySchlbk-Italic.pmf \
|
NewCentSchlbk-Ital.pmf \
|
||||||
NewCenturySchlbk-Roman.pmf \
|
NewCentSchlbk-Roman.pmf \
|
||||||
Souvenir-Demi.pmf \
|
Souvenir-Demi.pmf \
|
||||||
Souvenir-DemiItalic.pmf \
|
Souvenir-DemiItalic.pmf \
|
||||||
Souvenir-Light.pmf \
|
Souvenir-Light.pmf \
|
||||||
|
|
|
@ -17,9 +17,10 @@ dist_xpc_DATA = \
|
||||||
LubalinGraph-Book.pmf \
|
LubalinGraph-Book.pmf \
|
||||||
LubalinGraph-DemiOblique.pmf \
|
LubalinGraph-DemiOblique.pmf \
|
||||||
LubalinGraph-Demi.pmf \
|
LubalinGraph-Demi.pmf \
|
||||||
NewCenturySchlbk-Bold.pmf \
|
NewCentSchlbk-Bold.pmf \
|
||||||
NewCenturySchlbk-Italic.pmf \
|
NewCentSchlbk-BoldItal.pmf \
|
||||||
NewCenturySchlbk-Roman.pmf \
|
NewCentSchlbk-Ital.pmf \
|
||||||
|
NewCentSchlbk-Roman.pmf \
|
||||||
Souvenir-DemiItalic.pmf \
|
Souvenir-DemiItalic.pmf \
|
||||||
Souvenir-Demi.pmf \
|
Souvenir-Demi.pmf \
|
||||||
Souvenir-LightItalic.pmf \
|
Souvenir-LightItalic.pmf \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
xpcdir = @xpconfigdir@/C/print/models/SPSPARC2/fonts
|
xpcdir = @xpconfigdir@/C/print/models/SPSPARC2/fonts
|
||||||
|
|
||||||
parentdir = @xpconfigdir@/C/print/models/PSdefault/fonts
|
parentdir = ../../PSdefault/fonts
|
||||||
|
|
||||||
XPFONTS = \
|
XPFONTS = \
|
||||||
Courier-Bold.pmf \
|
Courier-Bold.pmf \
|
||||||
|
|
|
@ -86,9 +86,7 @@ typedef struct _Pixmap {
|
||||||
int refcnt;
|
int refcnt;
|
||||||
int devKind;
|
int devKind;
|
||||||
DevUnion devPrivate;
|
DevUnion devPrivate;
|
||||||
#ifdef PIXPRIV
|
|
||||||
DevUnion *devPrivates; /* real devPrivates like gcs & windows */
|
DevUnion *devPrivates; /* real devPrivates like gcs & windows */
|
||||||
#endif
|
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
short screen_x;
|
short screen_x;
|
||||||
short screen_y;
|
short screen_y;
|
||||||
|
|
|
@ -86,8 +86,6 @@ extern int AddScreen(
|
||||||
int /*argc*/,
|
int /*argc*/,
|
||||||
char** /*argv*/);
|
char** /*argv*/);
|
||||||
|
|
||||||
#ifdef PIXPRIV
|
|
||||||
|
|
||||||
extern void ResetPixmapPrivates(void);
|
extern void ResetPixmapPrivates(void);
|
||||||
|
|
||||||
extern int AllocatePixmapPrivateIndex(void);
|
extern int AllocatePixmapPrivateIndex(void);
|
||||||
|
@ -97,8 +95,6 @@ extern Bool AllocatePixmapPrivate(
|
||||||
int /* index */,
|
int /* index */,
|
||||||
unsigned /* amount */);
|
unsigned /* amount */);
|
||||||
|
|
||||||
#endif /* PIXPRIV */
|
|
||||||
|
|
||||||
extern void ResetColormapPrivates(void);
|
extern void ResetColormapPrivates(void);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -566,11 +566,9 @@ typedef struct _Screen {
|
||||||
|
|
||||||
PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
|
PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
|
||||||
|
|
||||||
#ifdef PIXPRIV
|
|
||||||
int PixmapPrivateLen;
|
int PixmapPrivateLen;
|
||||||
unsigned int *PixmapPrivateSizes;
|
unsigned int *PixmapPrivateSizes;
|
||||||
unsigned int totalPixmapSize;
|
unsigned int totalPixmapSize;
|
||||||
#endif
|
|
||||||
|
|
||||||
MarkWindowProcPtr MarkWindow;
|
MarkWindowProcPtr MarkWindow;
|
||||||
MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
|
MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
|
||||||
|
|
|
@ -101,12 +101,8 @@ mfbCreatePixmap (pScreen, width, height, depth)
|
||||||
pPixmap->drawable.height = height;
|
pPixmap->drawable.height = height;
|
||||||
pPixmap->devKind = paddedWidth;
|
pPixmap->devKind = paddedWidth;
|
||||||
pPixmap->refcnt = 1;
|
pPixmap->refcnt = 1;
|
||||||
#ifdef PIXPRIV
|
|
||||||
pPixmap->devPrivate.ptr = datasize ?
|
pPixmap->devPrivate.ptr = datasize ?
|
||||||
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
||||||
#else
|
|
||||||
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
|
|
||||||
#endif
|
|
||||||
return pPixmap;
|
return pPixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
56
mi/miarc.c
56
mi/miarc.c
|
@ -246,7 +246,7 @@ typedef struct _miPolyArc {
|
||||||
static CARD32 gcvals[6];
|
static CARD32 gcvals[6];
|
||||||
|
|
||||||
static void fillSpans(DrawablePtr pDrawable, GCPtr pGC);
|
static void fillSpans(DrawablePtr pDrawable, GCPtr pGC);
|
||||||
static void newFinalSpan(int y, register int xmin, register int xmax);
|
static void newFinalSpan(int y, int xmin, int xmax);
|
||||||
static void drawArc(xArc *tarc, int l, int a0, int a1, miArcFacePtr right,
|
static void drawArc(xArc *tarc, int l, int a0, int a1, miArcFacePtr right,
|
||||||
miArcFacePtr left);
|
miArcFacePtr left);
|
||||||
static void drawZeroArc(DrawablePtr pDraw, GCPtr pGC, xArc *tarc, int lw,
|
static void drawZeroArc(DrawablePtr pDraw, GCPtr pGC, xArc *tarc, int lw,
|
||||||
|
@ -461,11 +461,11 @@ miComputeCircleSpans(
|
||||||
xArc *parc,
|
xArc *parc,
|
||||||
miArcSpanData *spdata)
|
miArcSpanData *spdata)
|
||||||
{
|
{
|
||||||
register miArcSpan *span;
|
miArcSpan *span;
|
||||||
int doinner;
|
int doinner;
|
||||||
register int x, y, e;
|
int x, y, e;
|
||||||
int xk, yk, xm, ym, dx, dy;
|
int xk, yk, xm, ym, dx, dy;
|
||||||
register int slw, inslw;
|
int slw, inslw;
|
||||||
int inx = 0, iny, ine = 0;
|
int inx = 0, iny, ine = 0;
|
||||||
int inxk = 0, inyk = 0, inxm = 0, inym = 0;
|
int inxk = 0, inyk = 0, inxm = 0, inym = 0;
|
||||||
|
|
||||||
|
@ -529,7 +529,7 @@ miComputeEllipseSpans(
|
||||||
xArc *parc,
|
xArc *parc,
|
||||||
miArcSpanData *spdata)
|
miArcSpanData *spdata)
|
||||||
{
|
{
|
||||||
register miArcSpan *span;
|
miArcSpan *span;
|
||||||
double w, h, r, xorg;
|
double w, h, r, xorg;
|
||||||
double Hs, Hf, WH, K, Vk, Nk, Fk, Vr, N, Nc, Z, rs;
|
double Hs, Hf, WH, K, Vk, Nk, Fk, Vr, N, Nc, Z, rs;
|
||||||
double A, T, b, d, x, y, t, inx, outx = 0.0, hepp, hepm;
|
double A, T, b, d, x, y, t, inx, outx = 0.0, hepp, hepm;
|
||||||
|
@ -860,12 +860,12 @@ tailX(
|
||||||
static miArcSpanData *
|
static miArcSpanData *
|
||||||
miComputeWideEllipse(
|
miComputeWideEllipse(
|
||||||
int lw,
|
int lw,
|
||||||
register xArc *parc,
|
xArc *parc,
|
||||||
Bool *mustFree)
|
Bool *mustFree)
|
||||||
{
|
{
|
||||||
register miArcSpanData *spdata;
|
miArcSpanData *spdata;
|
||||||
register arcCacheRec *cent, *lruent;
|
arcCacheRec *cent, *lruent;
|
||||||
register int k;
|
int k;
|
||||||
arcCacheRec fakeent;
|
arcCacheRec fakeent;
|
||||||
|
|
||||||
if (!lw)
|
if (!lw)
|
||||||
|
@ -943,14 +943,14 @@ miFillWideEllipse(
|
||||||
xArc *parc)
|
xArc *parc)
|
||||||
{
|
{
|
||||||
DDXPointPtr points;
|
DDXPointPtr points;
|
||||||
register DDXPointPtr pts;
|
DDXPointPtr pts;
|
||||||
int *widths;
|
int *widths;
|
||||||
register int *wids;
|
int *wids;
|
||||||
miArcSpanData *spdata;
|
miArcSpanData *spdata;
|
||||||
Bool mustFree;
|
Bool mustFree;
|
||||||
register miArcSpan *span;
|
miArcSpan *span;
|
||||||
register int xorg, yorgu, yorgl;
|
int xorg, yorgu, yorgl;
|
||||||
register int n;
|
int n;
|
||||||
|
|
||||||
yorgu = parc->height + pGC->lineWidth;
|
yorgu = parc->height + pGC->lineWidth;
|
||||||
n = (sizeof(int) * 2) * yorgu;
|
n = (sizeof(int) * 2) * yorgu;
|
||||||
|
@ -1077,7 +1077,7 @@ miPolyArc(pDraw, pGC, narcs, parcs)
|
||||||
int narcs;
|
int narcs;
|
||||||
xArc *parcs;
|
xArc *parcs;
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
xArc *parc;
|
xArc *parc;
|
||||||
int xMin, xMax, yMin, yMax;
|
int xMin, xMax, yMin, yMax;
|
||||||
int pixmapWidth = 0, pixmapHeight = 0;
|
int pixmapWidth = 0, pixmapHeight = 0;
|
||||||
|
@ -3139,9 +3139,9 @@ static struct finalSpanChunk *chunks;
|
||||||
struct finalSpan *
|
struct finalSpan *
|
||||||
realAllocSpan ()
|
realAllocSpan ()
|
||||||
{
|
{
|
||||||
register struct finalSpanChunk *newChunk;
|
struct finalSpanChunk *newChunk;
|
||||||
register struct finalSpan *span;
|
struct finalSpan *span;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
newChunk = (struct finalSpanChunk *) xalloc (sizeof (struct finalSpanChunk));
|
newChunk = (struct finalSpanChunk *) xalloc (sizeof (struct finalSpanChunk));
|
||||||
if (!newChunk)
|
if (!newChunk)
|
||||||
|
@ -3179,12 +3179,12 @@ fillSpans (
|
||||||
DrawablePtr pDrawable,
|
DrawablePtr pDrawable,
|
||||||
GCPtr pGC)
|
GCPtr pGC)
|
||||||
{
|
{
|
||||||
register struct finalSpan *span;
|
struct finalSpan *span;
|
||||||
register DDXPointPtr xSpan;
|
DDXPointPtr xSpan;
|
||||||
register int *xWidth;
|
int *xWidth;
|
||||||
register int i;
|
int i;
|
||||||
register struct finalSpan **f;
|
struct finalSpan **f;
|
||||||
register int spany;
|
int spany;
|
||||||
DDXPointPtr xSpans;
|
DDXPointPtr xSpans;
|
||||||
int *xWidths;
|
int *xWidths;
|
||||||
|
|
||||||
|
@ -3280,11 +3280,11 @@ realFindSpan (int y)
|
||||||
static void
|
static void
|
||||||
newFinalSpan (
|
newFinalSpan (
|
||||||
int y,
|
int y,
|
||||||
register int xmin,
|
int xmin,
|
||||||
register int xmax)
|
int xmax)
|
||||||
{
|
{
|
||||||
register struct finalSpan *x;
|
struct finalSpan *x;
|
||||||
register struct finalSpan **f;
|
struct finalSpan **f;
|
||||||
struct finalSpan *oldx;
|
struct finalSpan *oldx;
|
||||||
struct finalSpan *prev;
|
struct finalSpan *prev;
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,8 @@ extern int ffs(int);
|
||||||
_X_EXPORT RegionPtr
|
_X_EXPORT RegionPtr
|
||||||
miCopyArea(pSrcDrawable, pDstDrawable,
|
miCopyArea(pSrcDrawable, pDstDrawable,
|
||||||
pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut)
|
pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut)
|
||||||
register DrawablePtr pSrcDrawable;
|
DrawablePtr pSrcDrawable;
|
||||||
register DrawablePtr pDstDrawable;
|
DrawablePtr pDstDrawable;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
int xIn, yIn;
|
int xIn, yIn;
|
||||||
int widthSrc, heightSrc;
|
int widthSrc, heightSrc;
|
||||||
|
|
|
@ -152,11 +152,11 @@ static void miBSClearBackingRegion(WindowPtr pWin, RegionPtr pRgn);
|
||||||
|
|
||||||
#define copyData(src,dst,n,morecopy) \
|
#define copyData(src,dst,n,morecopy) \
|
||||||
{ \
|
{ \
|
||||||
register short *srcCopy = (short *)(src); \
|
short *srcCopy = (short *)(src); \
|
||||||
register short *dstCopy = (short *)(dst); \
|
short *dstCopy = (short *)(dst); \
|
||||||
register int i; \
|
int i; \
|
||||||
register int bsx = pBackingStore->x; \
|
int bsx = pBackingStore->x; \
|
||||||
register int bsy = pBackingStore->y; \
|
int bsy = pBackingStore->y; \
|
||||||
for (i = n; --i >= 0; ) \
|
for (i = n; --i >= 0; ) \
|
||||||
{ \
|
{ \
|
||||||
*dstCopy++ = *srcCopy++ - bsx; \
|
*dstCopy++ = *srcCopy++ - bsx; \
|
||||||
|
@ -1010,7 +1010,7 @@ miBSSetSpans(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted)
|
||||||
DrawablePtr pDrawable;
|
DrawablePtr pDrawable;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
char *psrc;
|
char *psrc;
|
||||||
register DDXPointPtr ppt;
|
DDXPointPtr ppt;
|
||||||
int *pwidth;
|
int *pwidth;
|
||||||
int nspans;
|
int nspans;
|
||||||
int fSorted;
|
int fSorted;
|
||||||
|
@ -1150,8 +1150,8 @@ miBSDoCopy(
|
||||||
} *boxes; /* Array of box/drawable pairs covering
|
} *boxes; /* Array of box/drawable pairs covering
|
||||||
* source box. */
|
* source box. */
|
||||||
int *sequence; /* Sequence of boxes to move */
|
int *sequence; /* Sequence of boxes to move */
|
||||||
register int i, j, k, l, y;
|
int i, j, k, l, y;
|
||||||
register BoxPtr pBox;
|
BoxPtr pBox;
|
||||||
int dx, dy, nrects;
|
int dx, dy, nrects;
|
||||||
Bool graphicsExposures;
|
Bool graphicsExposures;
|
||||||
CopyPlaneProcPtr pixCopyProc;
|
CopyPlaneProcPtr pixCopyProc;
|
||||||
|
@ -1591,7 +1591,7 @@ static RegionPtr
|
||||||
miBSCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, plane)
|
miBSCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, plane)
|
||||||
DrawablePtr pSrc;
|
DrawablePtr pSrc;
|
||||||
DrawablePtr pDst;
|
DrawablePtr pDst;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
int srcx,
|
int srcx,
|
||||||
srcy;
|
srcy;
|
||||||
int w,
|
int w,
|
||||||
|
@ -1901,9 +1901,9 @@ miBSPolyArc(pDrawable, pGC, narcs, parcs)
|
||||||
static void
|
static void
|
||||||
miBSFillPolygon(pDrawable, pGC, shape, mode, count, pPts)
|
miBSFillPolygon(pDrawable, pGC, shape, mode, count, pPts)
|
||||||
DrawablePtr pDrawable;
|
DrawablePtr pDrawable;
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
int shape, mode;
|
int shape, mode;
|
||||||
register int count;
|
int count;
|
||||||
DDXPointPtr pPts;
|
DDXPointPtr pPts;
|
||||||
{
|
{
|
||||||
DDXPointPtr pPtsCopy;
|
DDXPointPtr pPtsCopy;
|
||||||
|
@ -2546,8 +2546,8 @@ static void
|
||||||
miBSAllocate(pWin)
|
miBSAllocate(pWin)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
{
|
{
|
||||||
register miBSWindowPtr pBackingStore;
|
miBSWindowPtr pBackingStore;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
|
||||||
if (pWin->drawable.pScreen->backingStoreSupport == NotUseful)
|
if (pWin->drawable.pScreen->backingStoreSupport == NotUseful)
|
||||||
return;
|
return;
|
||||||
|
@ -2648,7 +2648,7 @@ miBSFree(pWin)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
{
|
{
|
||||||
miBSWindowPtr pBackingStore;
|
miBSWindowPtr pBackingStore;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
|
@ -2792,7 +2792,7 @@ miResizeBackingStore(
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
|
miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
RegionPtr pObscured;
|
RegionPtr pObscured;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
{
|
{
|
||||||
|
@ -2899,14 +2899,14 @@ miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
|
||||||
*/
|
*/
|
||||||
static RegionPtr
|
static RegionPtr
|
||||||
miBSRestoreAreas(pWin, prgnExposed)
|
miBSRestoreAreas(pWin, prgnExposed)
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
RegionPtr prgnExposed;
|
RegionPtr prgnExposed;
|
||||||
{
|
{
|
||||||
PixmapPtr pBackingPixmap;
|
PixmapPtr pBackingPixmap;
|
||||||
miBSWindowPtr pBackingStore;
|
miBSWindowPtr pBackingStore;
|
||||||
RegionPtr prgnSaved;
|
RegionPtr prgnSaved;
|
||||||
RegionPtr prgnRestored;
|
RegionPtr prgnRestored;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
RegionPtr exposures = prgnExposed;
|
RegionPtr exposures = prgnExposed;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
@ -3097,10 +3097,10 @@ miBSTranslateBackingStore(pWin, windx, windy, oldClip, oldx, oldy)
|
||||||
int oldx; /* old window position */
|
int oldx; /* old window position */
|
||||||
int oldy;
|
int oldy;
|
||||||
{
|
{
|
||||||
register miBSWindowPtr pBackingStore;
|
miBSWindowPtr pBackingStore;
|
||||||
register RegionPtr pSavedRegion;
|
RegionPtr pSavedRegion;
|
||||||
register RegionPtr newSaved, doomed;
|
RegionPtr newSaved, doomed;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
BoxRec extents;
|
BoxRec extents;
|
||||||
int scrdx; /* bit translation distance on screen */
|
int scrdx; /* bit translation distance on screen */
|
||||||
int scrdy;
|
int scrdy;
|
||||||
|
@ -3815,9 +3815,9 @@ miBSExposeCopy (pSrc, pDst, pGC, prgnExposed, srcx, srcy, dstx, dsty, plane)
|
||||||
miBSWindowPtr pBackingStore;
|
miBSWindowPtr pBackingStore;
|
||||||
CopyPlaneProcPtr copyProc;
|
CopyPlaneProcPtr copyProc;
|
||||||
GCPtr pScratchGC;
|
GCPtr pScratchGC;
|
||||||
register BoxPtr pBox;
|
BoxPtr pBox;
|
||||||
register int i;
|
int i;
|
||||||
register int dx, dy;
|
int dx, dy;
|
||||||
BITS32 gcMask;
|
BITS32 gcMask;
|
||||||
|
|
||||||
if (!REGION_NOTEMPTY(pGC->pScreen, prgnExposed))
|
if (!REGION_NOTEMPTY(pGC->pScreen, prgnExposed))
|
||||||
|
|
12
mi/micmap.c
12
mi/micmap.c
|
@ -125,8 +125,8 @@ miResolveColor(unsigned short *pred, unsigned short *pgreen,
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miInitializeColormap(ColormapPtr pmap)
|
miInitializeColormap(ColormapPtr pmap)
|
||||||
{
|
{
|
||||||
register unsigned i;
|
unsigned i;
|
||||||
register VisualPtr pVisual;
|
VisualPtr pVisual;
|
||||||
unsigned lim, maxent, shift;
|
unsigned lim, maxent, shift;
|
||||||
|
|
||||||
pVisual = pmap->pVisual;
|
pVisual = pmap->pVisual;
|
||||||
|
@ -211,13 +211,13 @@ _X_EXPORT int
|
||||||
miExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem *indefs,
|
miExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem *indefs,
|
||||||
xColorItem *outdefs)
|
xColorItem *outdefs)
|
||||||
{
|
{
|
||||||
register int red, green, blue;
|
int red, green, blue;
|
||||||
int maxred, maxgreen, maxblue;
|
int maxred, maxgreen, maxblue;
|
||||||
int stepred, stepgreen, stepblue;
|
int stepred, stepgreen, stepblue;
|
||||||
VisualPtr pVisual;
|
VisualPtr pVisual;
|
||||||
register int pixel;
|
int pixel;
|
||||||
register int nresult;
|
int nresult;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
pVisual = pmap->pVisual;
|
pVisual = pmap->pVisual;
|
||||||
|
|
||||||
|
|
|
@ -130,15 +130,15 @@ exposing is done by the backing store's GraphicsExpose function, of course.
|
||||||
_X_EXPORT RegionPtr
|
_X_EXPORT RegionPtr
|
||||||
miHandleExposures(pSrcDrawable, pDstDrawable,
|
miHandleExposures(pSrcDrawable, pDstDrawable,
|
||||||
pGC, srcx, srcy, width, height, dstx, dsty, plane)
|
pGC, srcx, srcy, width, height, dstx, dsty, plane)
|
||||||
register DrawablePtr pSrcDrawable;
|
DrawablePtr pSrcDrawable;
|
||||||
register DrawablePtr pDstDrawable;
|
DrawablePtr pDstDrawable;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
int srcx, srcy;
|
int srcx, srcy;
|
||||||
int width, height;
|
int width, height;
|
||||||
int dstx, dsty;
|
int dstx, dsty;
|
||||||
unsigned long plane;
|
unsigned long plane;
|
||||||
{
|
{
|
||||||
register ScreenPtr pscr;
|
ScreenPtr pscr;
|
||||||
RegionPtr prgnSrcClip; /* drawable-relative source clip */
|
RegionPtr prgnSrcClip; /* drawable-relative source clip */
|
||||||
RegionRec rgnSrcRec;
|
RegionRec rgnSrcRec;
|
||||||
RegionPtr prgnDstClip; /* drawable-relative dest clip */
|
RegionPtr prgnDstClip; /* drawable-relative dest clip */
|
||||||
|
@ -387,9 +387,9 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor)
|
||||||
if (pRgn && !REGION_NIL(pRgn))
|
if (pRgn && !REGION_NIL(pRgn))
|
||||||
{
|
{
|
||||||
xEvent *pEvent;
|
xEvent *pEvent;
|
||||||
register xEvent *pe;
|
xEvent *pe;
|
||||||
register BoxPtr pBox;
|
BoxPtr pBox;
|
||||||
register int i;
|
int i;
|
||||||
int numRects;
|
int numRects;
|
||||||
|
|
||||||
numRects = REGION_NUM_RECTS(pRgn);
|
numRects = REGION_NUM_RECTS(pRgn);
|
||||||
|
@ -431,12 +431,12 @@ void
|
||||||
miSendExposures(pWin, pRgn, dx, dy)
|
miSendExposures(pWin, pRgn, dx, dy)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
RegionPtr pRgn;
|
RegionPtr pRgn;
|
||||||
register int dx, dy;
|
int dx, dy;
|
||||||
{
|
{
|
||||||
register BoxPtr pBox;
|
BoxPtr pBox;
|
||||||
int numRects;
|
int numRects;
|
||||||
register xEvent *pEvent, *pe;
|
xEvent *pEvent, *pe;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
pBox = REGION_RECTS(pRgn);
|
pBox = REGION_RECTS(pRgn);
|
||||||
numRects = REGION_NUM_RECTS(pRgn);
|
numRects = REGION_NUM_RECTS(pRgn);
|
||||||
|
@ -493,7 +493,7 @@ miSendExposures(pWin, pRgn, dx, dy)
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miWindowExposures(pWin, prgn, other_exposed)
|
miWindowExposures(pWin, prgn, other_exposed)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
register RegionPtr prgn, other_exposed;
|
RegionPtr prgn, other_exposed;
|
||||||
{
|
{
|
||||||
RegionPtr exposures = prgn;
|
RegionPtr exposures = prgn;
|
||||||
if (pWin->backStorage && prgn)
|
if (pWin->backStorage && prgn)
|
||||||
|
@ -629,7 +629,7 @@ tossGC (
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miPaintWindow(pWin, prgn, what)
|
miPaintWindow(pWin, prgn, what)
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
RegionPtr prgn;
|
RegionPtr prgn;
|
||||||
int what;
|
int what;
|
||||||
{
|
{
|
||||||
|
@ -657,10 +657,10 @@ int what;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
WindowPtr pBgWin;
|
WindowPtr pBgWin;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
register int i;
|
int i;
|
||||||
register BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
register ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
register xRectangle *prect;
|
xRectangle *prect;
|
||||||
int numRects;
|
int numRects;
|
||||||
|
|
||||||
gcmask = 0;
|
gcmask = 0;
|
||||||
|
|
|
@ -54,8 +54,8 @@ Author: Bob Scheifler, MIT X Consortium
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miFillArcSetup(arc, info)
|
miFillArcSetup(arc, info)
|
||||||
register xArc *arc;
|
xArc *arc;
|
||||||
register miFillArcRec *info;
|
miFillArcRec *info;
|
||||||
{
|
{
|
||||||
info->y = arc->height >> 1;
|
info->y = arc->height >> 1;
|
||||||
info->dy = arc->height & 1;
|
info->dy = arc->height & 1;
|
||||||
|
@ -109,8 +109,8 @@ miFillArcSetup(arc, info)
|
||||||
|
|
||||||
void
|
void
|
||||||
miFillArcDSetup(arc, info)
|
miFillArcDSetup(arc, info)
|
||||||
register xArc *arc;
|
xArc *arc;
|
||||||
register miFillArcDRec *info;
|
miFillArcDRec *info;
|
||||||
{
|
{
|
||||||
/* h^2 * (2x - 2xorg)^2 = w^2 * h^2 - w^2 * (2y - 2yorg)^2 */
|
/* h^2 * (2x - 2xorg)^2 = w^2 * h^2 - w^2 * (2y - 2yorg)^2 */
|
||||||
/* even: xorg = yorg = 0 odd: xorg = .5, yorg = -.5 */
|
/* even: xorg = yorg = 0 odd: xorg = .5, yorg = -.5 */
|
||||||
|
@ -141,13 +141,13 @@ miFillArcDSetup(arc, info)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
miGetArcEdge(
|
miGetArcEdge(
|
||||||
register xArc *arc,
|
xArc *arc,
|
||||||
register miSliceEdgePtr edge,
|
miSliceEdgePtr edge,
|
||||||
int k,
|
int k,
|
||||||
Bool top,
|
Bool top,
|
||||||
Bool left )
|
Bool left )
|
||||||
{
|
{
|
||||||
register int xady, y;
|
int xady, y;
|
||||||
|
|
||||||
y = arc->height >> 1;
|
y = arc->height >> 1;
|
||||||
if (!(arc->width & 1))
|
if (!(arc->width & 1))
|
||||||
|
@ -271,13 +271,13 @@ miEllipseAngleToSlope (angle, width, height, dxp, dyp, d_dxp, d_dyp)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
miGetPieEdge(
|
miGetPieEdge(
|
||||||
register xArc *arc,
|
xArc *arc,
|
||||||
register int angle,
|
int angle,
|
||||||
register miSliceEdgePtr edge,
|
miSliceEdgePtr edge,
|
||||||
Bool top,
|
Bool top,
|
||||||
Bool left )
|
Bool left )
|
||||||
{
|
{
|
||||||
register int k;
|
int k;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
|
|
||||||
miEllipseAngleToSlope (angle, arc->width, arc->height, &dx, &dy, 0, 0);
|
miEllipseAngleToSlope (angle, arc->width, arc->height, &dx, &dy, 0, 0);
|
||||||
|
@ -316,11 +316,11 @@ miGetPieEdge(
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miFillArcSliceSetup(arc, slice, pGC)
|
miFillArcSliceSetup(arc, slice, pGC)
|
||||||
register xArc *arc;
|
xArc *arc;
|
||||||
register miArcSliceRec *slice;
|
miArcSliceRec *slice;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
{
|
{
|
||||||
register int angle1, angle2;
|
int angle1, angle2;
|
||||||
|
|
||||||
angle1 = arc->angle1;
|
angle1 = arc->angle1;
|
||||||
if (arc->angle2 < 0)
|
if (arc->angle2 < 0)
|
||||||
|
@ -550,14 +550,14 @@ miFillEllipseI(
|
||||||
GCPtr pGC,
|
GCPtr pGC,
|
||||||
xArc *arc )
|
xArc *arc )
|
||||||
{
|
{
|
||||||
register int x, y, e;
|
int x, y, e;
|
||||||
int yk, xk, ym, xm, dx, dy, xorg, yorg;
|
int yk, xk, ym, xm, dx, dy, xorg, yorg;
|
||||||
int slw;
|
int slw;
|
||||||
miFillArcRec info;
|
miFillArcRec info;
|
||||||
DDXPointPtr points;
|
DDXPointPtr points;
|
||||||
register DDXPointPtr pts;
|
DDXPointPtr pts;
|
||||||
int *widths;
|
int *widths;
|
||||||
register int *wids;
|
int *wids;
|
||||||
|
|
||||||
points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * arc->height);
|
points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * arc->height);
|
||||||
if (!points)
|
if (!points)
|
||||||
|
@ -593,14 +593,14 @@ miFillEllipseD(
|
||||||
GCPtr pGC,
|
GCPtr pGC,
|
||||||
xArc *arc )
|
xArc *arc )
|
||||||
{
|
{
|
||||||
register int x, y;
|
int x, y;
|
||||||
int xorg, yorg, dx, dy, slw;
|
int xorg, yorg, dx, dy, slw;
|
||||||
double e, yk, xk, ym, xm;
|
double e, yk, xk, ym, xm;
|
||||||
miFillArcDRec info;
|
miFillArcDRec info;
|
||||||
DDXPointPtr points;
|
DDXPointPtr points;
|
||||||
register DDXPointPtr pts;
|
DDXPointPtr pts;
|
||||||
int *widths;
|
int *widths;
|
||||||
register int *wids;
|
int *wids;
|
||||||
|
|
||||||
points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * arc->height);
|
points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * arc->height);
|
||||||
if (!points)
|
if (!points)
|
||||||
|
@ -659,14 +659,14 @@ miFillArcSliceI(
|
||||||
xArc *arc )
|
xArc *arc )
|
||||||
{
|
{
|
||||||
int yk, xk, ym, xm, dx, dy, xorg, yorg, slw;
|
int yk, xk, ym, xm, dx, dy, xorg, yorg, slw;
|
||||||
register int x, y, e;
|
int x, y, e;
|
||||||
miFillArcRec info;
|
miFillArcRec info;
|
||||||
miArcSliceRec slice;
|
miArcSliceRec slice;
|
||||||
int ya, xl, xr, xc;
|
int ya, xl, xr, xc;
|
||||||
DDXPointPtr points;
|
DDXPointPtr points;
|
||||||
register DDXPointPtr pts;
|
DDXPointPtr pts;
|
||||||
int *widths;
|
int *widths;
|
||||||
register int *wids;
|
int *wids;
|
||||||
|
|
||||||
miFillArcSetup(arc, &info);
|
miFillArcSetup(arc, &info);
|
||||||
miFillArcSliceSetup(arc, &slice, pGC);
|
miFillArcSliceSetup(arc, &slice, pGC);
|
||||||
|
@ -721,16 +721,16 @@ miFillArcSliceD(
|
||||||
GCPtr pGC,
|
GCPtr pGC,
|
||||||
xArc *arc )
|
xArc *arc )
|
||||||
{
|
{
|
||||||
register int x, y;
|
int x, y;
|
||||||
int dx, dy, xorg, yorg, slw;
|
int dx, dy, xorg, yorg, slw;
|
||||||
double e, yk, xk, ym, xm;
|
double e, yk, xk, ym, xm;
|
||||||
miFillArcDRec info;
|
miFillArcDRec info;
|
||||||
miArcSliceRec slice;
|
miArcSliceRec slice;
|
||||||
int ya, xl, xr, xc;
|
int ya, xl, xr, xc;
|
||||||
DDXPointPtr points;
|
DDXPointPtr points;
|
||||||
register DDXPointPtr pts;
|
DDXPointPtr pts;
|
||||||
int *widths;
|
int *widths;
|
||||||
register int *wids;
|
int *wids;
|
||||||
|
|
||||||
miFillArcDSetup(arc, &info);
|
miFillArcDSetup(arc, &info);
|
||||||
miFillArcSliceSetup(arc, &slice, pGC);
|
miFillArcSliceSetup(arc, &slice, pGC);
|
||||||
|
@ -790,8 +790,8 @@ miPolyFillArc(pDraw, pGC, narcs, parcs)
|
||||||
int narcs;
|
int narcs;
|
||||||
xArc *parcs;
|
xArc *parcs;
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register xArc *arc;
|
xArc *arc;
|
||||||
|
|
||||||
for(i = narcs, arc = parcs; --i >= 0; arc++)
|
for(i = narcs, arc = parcs; --i >= 0; arc++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,16 +74,16 @@ miPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
|
||||||
xRectangle *prectInit; /* Pointer to first rectangle to fill */
|
xRectangle *prectInit; /* Pointer to first rectangle to fill */
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
register int height;
|
int height;
|
||||||
register int width;
|
int width;
|
||||||
register xRectangle *prect;
|
xRectangle *prect;
|
||||||
int xorg;
|
int xorg;
|
||||||
register int yorg;
|
int yorg;
|
||||||
int maxheight;
|
int maxheight;
|
||||||
DDXPointPtr pptFirst;
|
DDXPointPtr pptFirst;
|
||||||
register DDXPointPtr ppt;
|
DDXPointPtr ppt;
|
||||||
int *pwFirst;
|
int *pwFirst;
|
||||||
register int *pw;
|
int *pw;
|
||||||
|
|
||||||
if (pGC->miTranslate)
|
if (pGC->miTranslate)
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,7 +55,7 @@ SOFTWARE.
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
#include "mifpoly.h"
|
#include "mifpoly.h"
|
||||||
|
|
||||||
static int GetFPolyYBounds(register SppPointPtr pts, int n, double yFtrans,
|
static int GetFPolyYBounds(SppPointPtr pts, int n, double yFtrans,
|
||||||
int *by, int *ty);
|
int *by, int *ty);
|
||||||
|
|
||||||
#ifdef ICEILTEMPDECL
|
#ifdef ICEILTEMPDECL
|
||||||
|
@ -101,7 +101,7 @@ miFillSppPoly(dst, pgc, count, ptsIn, xTrans, yTrans, xFtrans, yFtrans)
|
||||||
*width,
|
*width,
|
||||||
*FirstWidth, /* output buffer */
|
*FirstWidth, /* output buffer */
|
||||||
*Marked; /* set if this vertex has been used */
|
*Marked; /* set if this vertex has been used */
|
||||||
register int left, right, /* indices to first endpoints */
|
int left, right, /* indices to first endpoints */
|
||||||
nextleft,
|
nextleft,
|
||||||
nextright; /* indices to second endpoints */
|
nextright; /* indices to second endpoints */
|
||||||
DDXPointPtr ptsOut,
|
DDXPointPtr ptsOut,
|
||||||
|
@ -251,13 +251,13 @@ miFillSppPoly(dst, pgc, count, ptsIn, xTrans, yTrans, xFtrans, yFtrans)
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
GetFPolyYBounds(
|
GetFPolyYBounds(
|
||||||
register SppPointPtr pts,
|
SppPointPtr pts,
|
||||||
int n,
|
int n,
|
||||||
double yFtrans,
|
double yFtrans,
|
||||||
int *by,
|
int *by,
|
||||||
int *ty)
|
int *ty)
|
||||||
{
|
{
|
||||||
register SppPointPtr ptMin;
|
SppPointPtr ptMin;
|
||||||
double ymin, ymax;
|
double ymin, ymax;
|
||||||
SppPointPtr ptsStart = pts;
|
SppPointPtr ptsStart = pts;
|
||||||
|
|
||||||
|
|
12
mi/miglblt.c
12
mi/miglblt.c
|
@ -95,14 +95,14 @@ miPolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
|
||||||
int nbyLine; /* bytes per line of padded pixmap */
|
int nbyLine; /* bytes per line of padded pixmap */
|
||||||
FontPtr pfont;
|
FontPtr pfont;
|
||||||
GCPtr pGCtmp;
|
GCPtr pGCtmp;
|
||||||
register int i;
|
int i;
|
||||||
register int j;
|
int j;
|
||||||
unsigned char *pbits; /* buffer for PutImage */
|
unsigned char *pbits; /* buffer for PutImage */
|
||||||
register unsigned char *pb; /* temp pointer into buffer */
|
unsigned char *pb; /* temp pointer into buffer */
|
||||||
register CharInfoPtr pci; /* currect char info */
|
CharInfoPtr pci; /* currect char info */
|
||||||
register unsigned char *pglyph; /* pointer bits in glyph */
|
unsigned char *pglyph; /* pointer bits in glyph */
|
||||||
int gWidth, gHeight; /* width and height of glyph */
|
int gWidth, gHeight; /* width and height of glyph */
|
||||||
register int nbyGlyphWidth; /* bytes per scanline of glyph */
|
int nbyGlyphWidth; /* bytes per scanline of glyph */
|
||||||
int nbyPadGlyph; /* server padded line of glyph */
|
int nbyPadGlyph; /* server padded line of glyph */
|
||||||
|
|
||||||
XID gcvals[3];
|
XID gcvals[3];
|
||||||
|
|
|
@ -109,7 +109,7 @@ extern void miSetZeroLineBias(
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SWAPINT(i, j) \
|
#define SWAPINT(i, j) \
|
||||||
{ register int _t = i; i = j; j = _t; }
|
{ int _t = i; i = j; j = _t; }
|
||||||
|
|
||||||
#define SWAPPT(i, j) \
|
#define SWAPPT(i, j) \
|
||||||
{ DDXPointRec _t; _t = i; i = j; j = _t; }
|
{ DDXPointRec _t; _t = i; i = j; j = _t; }
|
||||||
|
|
|
@ -1019,7 +1019,7 @@ miOverlayMoveWindow(
|
||||||
static void
|
static void
|
||||||
miOverlayWindowExposures(
|
miOverlayWindowExposures(
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
register RegionPtr prgn,
|
RegionPtr prgn,
|
||||||
RegionPtr other_exposed
|
RegionPtr other_exposed
|
||||||
){
|
){
|
||||||
RegionPtr exposures = prgn;
|
RegionPtr exposures = prgn;
|
||||||
|
@ -1106,7 +1106,7 @@ miOverlayRecomputeExposures (
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
pointer value
|
pointer value
|
||||||
){
|
){
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
miOverlayTwoRegions *pValid = (miOverlayTwoRegions*)value;
|
miOverlayTwoRegions *pValid = (miOverlayTwoRegions*)value;
|
||||||
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
|
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
|
||||||
|
|
||||||
|
@ -1161,10 +1161,10 @@ miOverlayResizeWindow(
|
||||||
DDXPointRec oldpt;
|
DDXPointRec oldpt;
|
||||||
RegionPtr oldRegion = NULL, oldRegion2 = NULL;
|
RegionPtr oldRegion = NULL, oldRegion2 = NULL;
|
||||||
WindowPtr pFirstChange;
|
WindowPtr pFirstChange;
|
||||||
register WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
RegionPtr gravitate[StaticGravity + 1];
|
RegionPtr gravitate[StaticGravity + 1];
|
||||||
RegionPtr gravitate2[StaticGravity + 1];
|
RegionPtr gravitate2[StaticGravity + 1];
|
||||||
register unsigned g;
|
unsigned g;
|
||||||
int nx, ny; /* destination x,y */
|
int nx, ny; /* destination x,y */
|
||||||
int newx, newy; /* new inner window position */
|
int newx, newy; /* new inner window position */
|
||||||
RegionPtr pRegion = NULL;
|
RegionPtr pRegion = NULL;
|
||||||
|
@ -1669,7 +1669,7 @@ miOverlayChangeBorderWidth(
|
||||||
unsigned int width
|
unsigned int width
|
||||||
){
|
){
|
||||||
int oldwidth;
|
int oldwidth;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
Bool HadBorder;
|
Bool HadBorder;
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
|
|
|
@ -70,14 +70,14 @@ SOFTWARE.
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miFillPolygon(dst, pgc, shape, mode, count, pPts)
|
miFillPolygon(dst, pgc, shape, mode, count, pPts)
|
||||||
DrawablePtr dst;
|
DrawablePtr dst;
|
||||||
register GCPtr pgc;
|
GCPtr pgc;
|
||||||
int shape, mode;
|
int shape, mode;
|
||||||
register int count;
|
int count;
|
||||||
DDXPointPtr pPts;
|
DDXPointPtr pPts;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
register int xorg, yorg;
|
int xorg, yorg;
|
||||||
register DDXPointPtr ppt;
|
DDXPointPtr ppt;
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -78,9 +78,9 @@ miFillConvexPoly(dst, pgc, count, ptsIn)
|
||||||
int count; /* number of points */
|
int count; /* number of points */
|
||||||
DDXPointPtr ptsIn; /* the points */
|
DDXPointPtr ptsIn; /* the points */
|
||||||
{
|
{
|
||||||
register int xl = 0, xr = 0; /* x vals of left and right edges */
|
int xl = 0, xr = 0; /* x vals of left and right edges */
|
||||||
register int dl = 0, dr = 0; /* decision variables */
|
int dl = 0, dr = 0; /* decision variables */
|
||||||
register int ml = 0, m1l = 0;/* left edge slope and slope+1 */
|
int ml = 0, m1l = 0;/* left edge slope and slope+1 */
|
||||||
int mr = 0, m1r = 0; /* right edge slope and slope+1 */
|
int mr = 0, m1r = 0; /* right edge slope and slope+1 */
|
||||||
int incr1l = 0, incr2l = 0; /* left edge error increments */
|
int incr1l = 0, incr2l = 0; /* left edge error increments */
|
||||||
int incr1r = 0, incr2r = 0; /* right edge error increments */
|
int incr1r = 0, incr2r = 0; /* right edge error increments */
|
||||||
|
@ -221,7 +221,7 @@ miFillConvexPoly(dst, pgc, count, ptsIn)
|
||||||
static int
|
static int
|
||||||
getPolyYBounds(DDXPointPtr pts, int n, int *by, int *ty)
|
getPolyYBounds(DDXPointPtr pts, int n, int *by, int *ty)
|
||||||
{
|
{
|
||||||
register DDXPointPtr ptMin;
|
DDXPointPtr ptMin;
|
||||||
int ymin, ymax;
|
int ymin, ymax;
|
||||||
DDXPointPtr ptsStart = pts;
|
DDXPointPtr ptsStart = pts;
|
||||||
|
|
||||||
|
|
|
@ -72,12 +72,12 @@ miFillGeneralPoly(dst, pgc, count, ptsIn)
|
||||||
int count; /* number of points */
|
int count; /* number of points */
|
||||||
DDXPointPtr ptsIn; /* the points */
|
DDXPointPtr ptsIn; /* the points */
|
||||||
{
|
{
|
||||||
register EdgeTableEntry *pAET; /* the Active Edge Table */
|
EdgeTableEntry *pAET; /* the Active Edge Table */
|
||||||
register int y; /* the current scanline */
|
int y; /* the current scanline */
|
||||||
register int nPts = 0; /* number of pts in buffer */
|
int nPts = 0; /* number of pts in buffer */
|
||||||
register EdgeTableEntry *pWETE; /* Winding Edge Table */
|
EdgeTableEntry *pWETE; /* Winding Edge Table */
|
||||||
register ScanLineList *pSLL; /* Current ScanLineList */
|
ScanLineList *pSLL; /* Current ScanLineList */
|
||||||
register DDXPointPtr ptsOut; /* ptr to output buffers */
|
DDXPointPtr ptsOut; /* ptr to output buffers */
|
||||||
int *width;
|
int *width;
|
||||||
DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */
|
DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */
|
||||||
int FirstWidth[NUMPTSTOBUFFER];
|
int FirstWidth[NUMPTSTOBUFFER];
|
||||||
|
|
|
@ -70,7 +70,7 @@ miPolyPoint(pDrawable, pGC, mode, npt, pptInit)
|
||||||
XID fsOld, fsNew;
|
XID fsOld, fsNew;
|
||||||
int *pwidthInit, *pwidth;
|
int *pwidthInit, *pwidth;
|
||||||
int i;
|
int i;
|
||||||
register xPoint *ppt;
|
xPoint *ppt;
|
||||||
|
|
||||||
/* make pointlist origin relative */
|
/* make pointlist origin relative */
|
||||||
if (mode == CoordModePrevious)
|
if (mode == CoordModePrevious)
|
||||||
|
|
|
@ -81,8 +81,8 @@ miInsertEdgeInET(ET, ETE, scanline, SLLBlock, iSLLBlock)
|
||||||
ScanLineListBlock **SLLBlock;
|
ScanLineListBlock **SLLBlock;
|
||||||
int *iSLLBlock;
|
int *iSLLBlock;
|
||||||
{
|
{
|
||||||
register EdgeTableEntry *start, *prev;
|
EdgeTableEntry *start, *prev;
|
||||||
register ScanLineList *pSLL, *pPrevSLL;
|
ScanLineList *pSLL, *pPrevSLL;
|
||||||
ScanLineListBlock *tmpSLLBlock;
|
ScanLineListBlock *tmpSLLBlock;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -166,15 +166,15 @@ miInsertEdgeInET(ET, ETE, scanline, SLLBlock, iSLLBlock)
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
miCreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock)
|
miCreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock)
|
||||||
register int count;
|
int count;
|
||||||
register DDXPointPtr pts;
|
DDXPointPtr pts;
|
||||||
EdgeTable *ET;
|
EdgeTable *ET;
|
||||||
EdgeTableEntry *AET;
|
EdgeTableEntry *AET;
|
||||||
register EdgeTableEntry *pETEs;
|
EdgeTableEntry *pETEs;
|
||||||
ScanLineListBlock *pSLLBlock;
|
ScanLineListBlock *pSLLBlock;
|
||||||
{
|
{
|
||||||
register DDXPointPtr top, bottom;
|
DDXPointPtr top, bottom;
|
||||||
register DDXPointPtr PrevPt, CurrPt;
|
DDXPointPtr PrevPt, CurrPt;
|
||||||
int iSLLBlock = 0;
|
int iSLLBlock = 0;
|
||||||
|
|
||||||
int dy;
|
int dy;
|
||||||
|
@ -262,10 +262,10 @@ miCreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock)
|
||||||
|
|
||||||
void
|
void
|
||||||
miloadAET(AET, ETEs)
|
miloadAET(AET, ETEs)
|
||||||
register EdgeTableEntry *AET, *ETEs;
|
EdgeTableEntry *AET, *ETEs;
|
||||||
{
|
{
|
||||||
register EdgeTableEntry *pPrevAET;
|
EdgeTableEntry *pPrevAET;
|
||||||
register EdgeTableEntry *tmp;
|
EdgeTableEntry *tmp;
|
||||||
|
|
||||||
pPrevAET = AET;
|
pPrevAET = AET;
|
||||||
AET = AET->next;
|
AET = AET->next;
|
||||||
|
@ -310,11 +310,11 @@ miloadAET(AET, ETEs)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
micomputeWAET(AET)
|
micomputeWAET(AET)
|
||||||
register EdgeTableEntry *AET;
|
EdgeTableEntry *AET;
|
||||||
{
|
{
|
||||||
register EdgeTableEntry *pWETE;
|
EdgeTableEntry *pWETE;
|
||||||
register int inside = 1;
|
int inside = 1;
|
||||||
register int isInside = 0;
|
int isInside = 0;
|
||||||
|
|
||||||
AET->nextWETE = (EdgeTableEntry *)NULL;
|
AET->nextWETE = (EdgeTableEntry *)NULL;
|
||||||
pWETE = AET;
|
pWETE = AET;
|
||||||
|
@ -349,12 +349,12 @@ micomputeWAET(AET)
|
||||||
|
|
||||||
int
|
int
|
||||||
miInsertionSort(AET)
|
miInsertionSort(AET)
|
||||||
register EdgeTableEntry *AET;
|
EdgeTableEntry *AET;
|
||||||
{
|
{
|
||||||
register EdgeTableEntry *pETEchase;
|
EdgeTableEntry *pETEchase;
|
||||||
register EdgeTableEntry *pETEinsert;
|
EdgeTableEntry *pETEinsert;
|
||||||
register EdgeTableEntry *pETEchaseBackTMP;
|
EdgeTableEntry *pETEchaseBackTMP;
|
||||||
register int changed = 0;
|
int changed = 0;
|
||||||
|
|
||||||
AET = AET->next;
|
AET = AET->next;
|
||||||
while (AET)
|
while (AET)
|
||||||
|
@ -386,9 +386,9 @@ miInsertionSort(AET)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
miFreeStorage(pSLLBlock)
|
miFreeStorage(pSLLBlock)
|
||||||
register ScanLineListBlock *pSLLBlock;
|
ScanLineListBlock *pSLLBlock;
|
||||||
{
|
{
|
||||||
register ScanLineListBlock *tmpSLLBlock;
|
ScanLineListBlock *tmpSLLBlock;
|
||||||
|
|
||||||
while (pSLLBlock)
|
while (pSLLBlock)
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,10 +86,10 @@ miPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
|
||||||
{
|
{
|
||||||
int h, dxDivPPW, ibEnd;
|
int h, dxDivPPW, ibEnd;
|
||||||
MiBits *pwLineStart;
|
MiBits *pwLineStart;
|
||||||
register MiBits *pw, *pwEnd;
|
MiBits *pw, *pwEnd;
|
||||||
register MiBits msk;
|
MiBits msk;
|
||||||
register int ib, w;
|
int ib, w;
|
||||||
register int ipt; /* index into above arrays */
|
int ipt; /* index into above arrays */
|
||||||
Bool fInBox;
|
Bool fInBox;
|
||||||
DDXPointRec pt[NPT], ptThisLine;
|
DDXPointRec pt[NPT], ptThisLine;
|
||||||
int width[NPT];
|
int width[NPT];
|
||||||
|
|
224
mi/miregion.c
224
mi/miregion.c
|
@ -228,7 +228,7 @@ miPrintRegion(rgn)
|
||||||
RegionPtr rgn;
|
RegionPtr rgn;
|
||||||
{
|
{
|
||||||
int num, size;
|
int num, size;
|
||||||
register int i;
|
int i;
|
||||||
BoxPtr rects;
|
BoxPtr rects;
|
||||||
|
|
||||||
num = REGION_NUM_RECTS(rgn);
|
num = REGION_NUM_RECTS(rgn);
|
||||||
|
@ -275,7 +275,7 @@ Bool
|
||||||
miValidRegion(reg)
|
miValidRegion(reg)
|
||||||
RegionPtr reg;
|
RegionPtr reg;
|
||||||
{
|
{
|
||||||
register int i, numRects;
|
int i, numRects;
|
||||||
|
|
||||||
if ((reg->extents.x1 > reg->extents.x2) ||
|
if ((reg->extents.x1 > reg->extents.x2) ||
|
||||||
(reg->extents.y1 > reg->extents.y2))
|
(reg->extents.y1 > reg->extents.y2))
|
||||||
|
@ -289,7 +289,7 @@ miValidRegion(reg)
|
||||||
return (!reg->data);
|
return (!reg->data);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
register BoxPtr pboxP, pboxN;
|
BoxPtr pboxP, pboxN;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
pboxP = REGION_RECTS(reg);
|
pboxP = REGION_RECTS(reg);
|
||||||
|
@ -331,7 +331,7 @@ miRegionCreate(rect, size)
|
||||||
BoxPtr rect;
|
BoxPtr rect;
|
||||||
int size;
|
int size;
|
||||||
{
|
{
|
||||||
register RegionPtr pReg;
|
RegionPtr pReg;
|
||||||
|
|
||||||
pReg = (RegionPtr)xalloc(sizeof(RegionRec));
|
pReg = (RegionPtr)xalloc(sizeof(RegionRec));
|
||||||
if (!pReg)
|
if (!pReg)
|
||||||
|
@ -414,7 +414,7 @@ miRegionBreak (pReg)
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miRectAlloc(
|
miRectAlloc(
|
||||||
register RegionPtr pRgn,
|
RegionPtr pRgn,
|
||||||
int n)
|
int n)
|
||||||
{
|
{
|
||||||
RegDataPtr data;
|
RegDataPtr data;
|
||||||
|
@ -455,8 +455,8 @@ miRectAlloc(
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miRegionCopy(dst, src)
|
miRegionCopy(dst, src)
|
||||||
register RegionPtr dst;
|
RegionPtr dst;
|
||||||
register RegionPtr src;
|
RegionPtr src;
|
||||||
{
|
{
|
||||||
good(dst);
|
good(dst);
|
||||||
good(src);
|
good(src);
|
||||||
|
@ -508,14 +508,14 @@ miRegionCopy(dst, src)
|
||||||
*/
|
*/
|
||||||
INLINE static int
|
INLINE static int
|
||||||
miCoalesce (
|
miCoalesce (
|
||||||
register RegionPtr pReg, /* Region to coalesce */
|
RegionPtr pReg, /* Region to coalesce */
|
||||||
int prevStart, /* Index of start of previous band */
|
int prevStart, /* Index of start of previous band */
|
||||||
int curStart) /* Index of start of current band */
|
int curStart) /* Index of start of current band */
|
||||||
{
|
{
|
||||||
register BoxPtr pPrevBox; /* Current box in previous band */
|
BoxPtr pPrevBox; /* Current box in previous band */
|
||||||
register BoxPtr pCurBox; /* Current box in current band */
|
BoxPtr pCurBox; /* Current box in current band */
|
||||||
register int numRects; /* Number rectangles in both bands */
|
int numRects; /* Number rectangles in both bands */
|
||||||
register int y2; /* Bottom of current band */
|
int y2; /* Bottom of current band */
|
||||||
/*
|
/*
|
||||||
* Figure out how many rectangles are in the band.
|
* Figure out how many rectangles are in the band.
|
||||||
*/
|
*/
|
||||||
|
@ -592,14 +592,14 @@ miCoalesce (
|
||||||
|
|
||||||
INLINE static Bool
|
INLINE static Bool
|
||||||
miAppendNonO (
|
miAppendNonO (
|
||||||
register RegionPtr pReg,
|
RegionPtr pReg,
|
||||||
register BoxPtr r,
|
BoxPtr r,
|
||||||
BoxPtr rEnd,
|
BoxPtr rEnd,
|
||||||
register int y1,
|
int y1,
|
||||||
register int y2)
|
int y2)
|
||||||
{
|
{
|
||||||
register BoxPtr pNextRect;
|
BoxPtr pNextRect;
|
||||||
register int newRects;
|
int newRects;
|
||||||
|
|
||||||
newRects = rEnd - r;
|
newRects = rEnd - r;
|
||||||
|
|
||||||
|
@ -691,8 +691,8 @@ miRegionOp(
|
||||||
/* in region 2 ? */
|
/* in region 2 ? */
|
||||||
Bool *pOverlap)
|
Bool *pOverlap)
|
||||||
{
|
{
|
||||||
register BoxPtr r1; /* Pointer into first region */
|
BoxPtr r1; /* Pointer into first region */
|
||||||
register BoxPtr r2; /* Pointer into 2d region */
|
BoxPtr r2; /* Pointer into 2d region */
|
||||||
BoxPtr r1End; /* End of 1st region */
|
BoxPtr r1End; /* End of 1st region */
|
||||||
BoxPtr r2End; /* End of 2d region */
|
BoxPtr r2End; /* End of 2d region */
|
||||||
short ybot; /* Bottom of intersection */
|
short ybot; /* Bottom of intersection */
|
||||||
|
@ -702,12 +702,12 @@ miRegionOp(
|
||||||
* previous band in newReg */
|
* previous band in newReg */
|
||||||
int curBand; /* Index of start of current
|
int curBand; /* Index of start of current
|
||||||
* band in newReg */
|
* band in newReg */
|
||||||
register BoxPtr r1BandEnd; /* End of current band in r1 */
|
BoxPtr r1BandEnd; /* End of current band in r1 */
|
||||||
register BoxPtr r2BandEnd; /* End of current band in r2 */
|
BoxPtr r2BandEnd; /* End of current band in r2 */
|
||||||
short top; /* Top of non-overlapping band */
|
short top; /* Top of non-overlapping band */
|
||||||
short bot; /* Bottom of non-overlapping band*/
|
short bot; /* Bottom of non-overlapping band*/
|
||||||
register int r1y1; /* Temps for r1->y1 and r2->y1 */
|
int r1y1; /* Temps for r1->y1 and r2->y1 */
|
||||||
register int r2y1;
|
int r2y1;
|
||||||
int newSize;
|
int newSize;
|
||||||
int numRects;
|
int numRects;
|
||||||
|
|
||||||
|
@ -915,9 +915,9 @@ miRegionOp(
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
miSetExtents (pReg)
|
miSetExtents (pReg)
|
||||||
register RegionPtr pReg;
|
RegionPtr pReg;
|
||||||
{
|
{
|
||||||
register BoxPtr pBox, pBoxEnd;
|
BoxPtr pBox, pBoxEnd;
|
||||||
|
|
||||||
if (!pReg->data)
|
if (!pReg->data)
|
||||||
return;
|
return;
|
||||||
|
@ -974,18 +974,18 @@ miSetExtents (pReg)
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static Bool
|
static Bool
|
||||||
miIntersectO (
|
miIntersectO (
|
||||||
register RegionPtr pReg,
|
RegionPtr pReg,
|
||||||
register BoxPtr r1,
|
BoxPtr r1,
|
||||||
BoxPtr r1End,
|
BoxPtr r1End,
|
||||||
register BoxPtr r2,
|
BoxPtr r2,
|
||||||
BoxPtr r2End,
|
BoxPtr r2End,
|
||||||
short y1,
|
short y1,
|
||||||
short y2,
|
short y2,
|
||||||
Bool *pOverlap)
|
Bool *pOverlap)
|
||||||
{
|
{
|
||||||
register int x1;
|
int x1;
|
||||||
register int x2;
|
int x2;
|
||||||
register BoxPtr pNextRect;
|
BoxPtr pNextRect;
|
||||||
|
|
||||||
pNextRect = REGION_TOP(pReg);
|
pNextRect = REGION_TOP(pReg);
|
||||||
|
|
||||||
|
@ -1022,9 +1022,9 @@ miIntersectO (
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miIntersect(newReg, reg1, reg2)
|
miIntersect(newReg, reg1, reg2)
|
||||||
register RegionPtr newReg; /* destination Region */
|
RegionPtr newReg; /* destination Region */
|
||||||
register RegionPtr reg1;
|
RegionPtr reg1;
|
||||||
register RegionPtr reg2; /* source regions */
|
RegionPtr reg2; /* source regions */
|
||||||
{
|
{
|
||||||
good(reg1);
|
good(reg1);
|
||||||
good(reg2);
|
good(reg2);
|
||||||
|
@ -1117,18 +1117,18 @@ miIntersect(newReg, reg1, reg2)
|
||||||
*/
|
*/
|
||||||
static Bool
|
static Bool
|
||||||
miUnionO (
|
miUnionO (
|
||||||
register RegionPtr pReg,
|
RegionPtr pReg,
|
||||||
register BoxPtr r1,
|
BoxPtr r1,
|
||||||
BoxPtr r1End,
|
BoxPtr r1End,
|
||||||
register BoxPtr r2,
|
BoxPtr r2,
|
||||||
BoxPtr r2End,
|
BoxPtr r2End,
|
||||||
short y1,
|
short y1,
|
||||||
short y2,
|
short y2,
|
||||||
Bool *pOverlap)
|
Bool *pOverlap)
|
||||||
{
|
{
|
||||||
register BoxPtr pNextRect;
|
BoxPtr pNextRect;
|
||||||
register int x1; /* left and right side of current union */
|
int x1; /* left and right side of current union */
|
||||||
register int x2;
|
int x2;
|
||||||
|
|
||||||
assert (y1 < y2);
|
assert (y1 < y2);
|
||||||
assert(r1 != r1End && r2 != r2End);
|
assert(r1 != r1End && r2 != r2End);
|
||||||
|
@ -1178,8 +1178,8 @@ miUnionO (
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miUnion(newReg, reg1, reg2)
|
miUnion(newReg, reg1, reg2)
|
||||||
RegionPtr newReg; /* destination Region */
|
RegionPtr newReg; /* destination Region */
|
||||||
register RegionPtr reg1;
|
RegionPtr reg1;
|
||||||
register RegionPtr reg2; /* source regions */
|
RegionPtr reg2; /* source regions */
|
||||||
{
|
{
|
||||||
Bool overlap; /* result ignored */
|
Bool overlap; /* result ignored */
|
||||||
|
|
||||||
|
@ -1276,8 +1276,8 @@ miUnion(newReg, reg1, reg2)
|
||||||
*/
|
*/
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miRegionAppend(dstrgn, rgn)
|
miRegionAppend(dstrgn, rgn)
|
||||||
register RegionPtr dstrgn;
|
RegionPtr dstrgn;
|
||||||
register RegionPtr rgn;
|
RegionPtr rgn;
|
||||||
{
|
{
|
||||||
int numRects, dnumRects, size;
|
int numRects, dnumRects, size;
|
||||||
BoxPtr new, old;
|
BoxPtr new, old;
|
||||||
|
@ -1307,7 +1307,7 @@ miRegionAppend(dstrgn, rgn)
|
||||||
dstrgn->extents = rgn->extents;
|
dstrgn->extents = rgn->extents;
|
||||||
else if (dstrgn->extents.x2 > dstrgn->extents.x1)
|
else if (dstrgn->extents.x2 > dstrgn->extents.x1)
|
||||||
{
|
{
|
||||||
register BoxPtr first, last;
|
BoxPtr first, last;
|
||||||
|
|
||||||
first = old;
|
first = old;
|
||||||
last = REGION_BOXPTR(dstrgn) + (dnumRects - 1);
|
last = REGION_BOXPTR(dstrgn) + (dnumRects - 1);
|
||||||
|
@ -1371,13 +1371,13 @@ miRegionAppend(dstrgn, rgn)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
QuickSortRects(
|
QuickSortRects(
|
||||||
register BoxRec rects[],
|
BoxRec rects[],
|
||||||
register int numRects)
|
int numRects)
|
||||||
{
|
{
|
||||||
register int y1;
|
int y1;
|
||||||
register int x1;
|
int x1;
|
||||||
register int i, j;
|
int i, j;
|
||||||
register BoxPtr r;
|
BoxPtr r;
|
||||||
|
|
||||||
/* Always called with numRects > 1 */
|
/* Always called with numRects > 1 */
|
||||||
|
|
||||||
|
@ -1477,12 +1477,12 @@ miRegionValidate(badreg, pOverlap)
|
||||||
int numRI; /* Number of entries used in ri */
|
int numRI; /* Number of entries used in ri */
|
||||||
int sizeRI; /* Number of entries available in ri */
|
int sizeRI; /* Number of entries available in ri */
|
||||||
int i; /* Index into rects */
|
int i; /* Index into rects */
|
||||||
register int j; /* Index into ri */
|
int j; /* Index into ri */
|
||||||
register RegionInfo *rit; /* &ri[j] */
|
RegionInfo *rit; /* &ri[j] */
|
||||||
register RegionPtr reg; /* ri[j].reg */
|
RegionPtr reg; /* ri[j].reg */
|
||||||
register BoxPtr box; /* Current box in rects */
|
BoxPtr box; /* Current box in rects */
|
||||||
register BoxPtr riBox; /* Last box in ri[j].reg */
|
BoxPtr riBox; /* Last box in ri[j].reg */
|
||||||
register RegionPtr hreg; /* ri[j_half].reg */
|
RegionPtr hreg; /* ri[j_half].reg */
|
||||||
Bool ret = TRUE;
|
Bool ret = TRUE;
|
||||||
|
|
||||||
*pOverlap = FALSE;
|
*pOverlap = FALSE;
|
||||||
|
@ -1654,13 +1654,13 @@ bail:
|
||||||
_X_EXPORT RegionPtr
|
_X_EXPORT RegionPtr
|
||||||
miRectsToRegion(nrects, prect, ctype)
|
miRectsToRegion(nrects, prect, ctype)
|
||||||
int nrects;
|
int nrects;
|
||||||
register xRectangle *prect;
|
xRectangle *prect;
|
||||||
int ctype;
|
int ctype;
|
||||||
{
|
{
|
||||||
register RegionPtr pRgn;
|
RegionPtr pRgn;
|
||||||
register RegDataPtr pData;
|
RegDataPtr pData;
|
||||||
register BoxPtr pBox;
|
BoxPtr pBox;
|
||||||
register int i;
|
int i;
|
||||||
int x1, y1, x2, y2;
|
int x1, y1, x2, y2;
|
||||||
|
|
||||||
pRgn = miRegionCreate(NullBox, 0);
|
pRgn = miRegionCreate(NullBox, 0);
|
||||||
|
@ -1754,17 +1754,17 @@ miRectsToRegion(nrects, prect, ctype)
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static Bool
|
static Bool
|
||||||
miSubtractO (
|
miSubtractO (
|
||||||
register RegionPtr pReg,
|
RegionPtr pReg,
|
||||||
register BoxPtr r1,
|
BoxPtr r1,
|
||||||
BoxPtr r1End,
|
BoxPtr r1End,
|
||||||
register BoxPtr r2,
|
BoxPtr r2,
|
||||||
BoxPtr r2End,
|
BoxPtr r2End,
|
||||||
register short y1,
|
short y1,
|
||||||
short y2,
|
short y2,
|
||||||
Bool *pOverlap)
|
Bool *pOverlap)
|
||||||
{
|
{
|
||||||
register BoxPtr pNextRect;
|
BoxPtr pNextRect;
|
||||||
register int x1;
|
int x1;
|
||||||
|
|
||||||
x1 = r1->x1;
|
x1 = r1->x1;
|
||||||
|
|
||||||
|
@ -1878,9 +1878,9 @@ miSubtractO (
|
||||||
*/
|
*/
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miSubtract(regD, regM, regS)
|
miSubtract(regD, regM, regS)
|
||||||
register RegionPtr regD;
|
RegionPtr regD;
|
||||||
register RegionPtr regM;
|
RegionPtr regM;
|
||||||
register RegionPtr regS;
|
RegionPtr regS;
|
||||||
{
|
{
|
||||||
Bool overlap; /* result ignored */
|
Bool overlap; /* result ignored */
|
||||||
|
|
||||||
|
@ -2003,13 +2003,13 @@ miInverse(newReg, reg1, invRect)
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
miRectIn(region, prect)
|
miRectIn(region, prect)
|
||||||
register RegionPtr region;
|
RegionPtr region;
|
||||||
register BoxPtr prect;
|
BoxPtr prect;
|
||||||
{
|
{
|
||||||
register int x;
|
int x;
|
||||||
register int y;
|
int y;
|
||||||
register BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
register BoxPtr pboxEnd;
|
BoxPtr pboxEnd;
|
||||||
int partIn, partOut;
|
int partIn, partOut;
|
||||||
int numRects;
|
int numRects;
|
||||||
|
|
||||||
|
@ -2099,13 +2099,13 @@ miRectIn(region, prect)
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miTranslateRegion(pReg, x, y)
|
miTranslateRegion(pReg, x, y)
|
||||||
register RegionPtr pReg;
|
RegionPtr pReg;
|
||||||
register int x;
|
int x;
|
||||||
register int y;
|
int y;
|
||||||
{
|
{
|
||||||
int x1, x2, y1, y2;
|
int x1, x2, y1, y2;
|
||||||
register int nbox;
|
int nbox;
|
||||||
register BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
|
|
||||||
good(pReg);
|
good(pReg);
|
||||||
pReg->extents.x1 = x1 = pReg->extents.x1 + x;
|
pReg->extents.x1 = x1 = pReg->extents.x1 + x;
|
||||||
|
@ -2144,7 +2144,7 @@ miTranslateRegion(pReg, x, y)
|
||||||
pReg->extents.y2 = MAXSHORT;
|
pReg->extents.y2 = MAXSHORT;
|
||||||
if (pReg->data && (nbox = pReg->data->numRects))
|
if (pReg->data && (nbox = pReg->data->numRects))
|
||||||
{
|
{
|
||||||
register BoxPtr pboxout;
|
BoxPtr pboxout;
|
||||||
|
|
||||||
for (pboxout = pbox = REGION_BOXPTR(pReg); nbox--; pbox++)
|
for (pboxout = pbox = REGION_BOXPTR(pReg); nbox--; pbox++)
|
||||||
{
|
{
|
||||||
|
@ -2184,8 +2184,8 @@ miTranslateRegion(pReg, x, y)
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
miRegionDataCopy(
|
miRegionDataCopy(
|
||||||
register RegionPtr dst,
|
RegionPtr dst,
|
||||||
register RegionPtr src)
|
RegionPtr src)
|
||||||
{
|
{
|
||||||
good(dst);
|
good(dst);
|
||||||
good(src);
|
good(src);
|
||||||
|
@ -2226,11 +2226,11 @@ miRegionReset(pReg, pBox)
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miPointInRegion(pReg, x, y, box)
|
miPointInRegion(pReg, x, y, box)
|
||||||
register RegionPtr pReg;
|
RegionPtr pReg;
|
||||||
register int x, y;
|
int x, y;
|
||||||
BoxPtr box; /* "return" value */
|
BoxPtr box; /* "return" value */
|
||||||
{
|
{
|
||||||
register BoxPtr pbox, pboxEnd;
|
BoxPtr pbox, pboxEnd;
|
||||||
int numRects;
|
int numRects;
|
||||||
|
|
||||||
good(pReg);
|
good(pReg);
|
||||||
|
@ -2295,7 +2295,7 @@ miRegionExtents(pReg)
|
||||||
#define ExchangeSpans(a, b) \
|
#define ExchangeSpans(a, b) \
|
||||||
{ \
|
{ \
|
||||||
DDXPointRec tpt; \
|
DDXPointRec tpt; \
|
||||||
register int tw; \
|
int tw; \
|
||||||
\
|
\
|
||||||
tpt = spans[a]; spans[a] = spans[b]; spans[b] = tpt; \
|
tpt = spans[a]; spans[a] = spans[b]; spans[b] = tpt; \
|
||||||
tw = widths[a]; widths[a] = widths[b]; widths[b] = tw; \
|
tw = widths[a]; widths[a] = widths[b]; widths[b] = tw; \
|
||||||
|
@ -2307,13 +2307,13 @@ miRegionExtents(pReg)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void QuickSortSpans(
|
static void QuickSortSpans(
|
||||||
register DDXPointRec spans[],
|
DDXPointRec spans[],
|
||||||
register int widths[],
|
int widths[],
|
||||||
register int numSpans)
|
int numSpans)
|
||||||
{
|
{
|
||||||
register int y;
|
int y;
|
||||||
register int i, j, m;
|
int i, j, m;
|
||||||
register DDXPointPtr r;
|
DDXPointPtr r;
|
||||||
|
|
||||||
/* Always called with numSpans > 1 */
|
/* Always called with numSpans > 1 */
|
||||||
/* Sorts only by y, doesn't bother to sort by x */
|
/* Sorts only by y, doesn't bother to sort by x */
|
||||||
|
@ -2323,7 +2323,7 @@ static void QuickSortSpans(
|
||||||
if (numSpans < 9)
|
if (numSpans < 9)
|
||||||
{
|
{
|
||||||
/* Do insertion sort */
|
/* Do insertion sort */
|
||||||
register int yprev;
|
int yprev;
|
||||||
|
|
||||||
yprev = spans[0].y;
|
yprev = spans[0].y;
|
||||||
i = 1;
|
i = 1;
|
||||||
|
@ -2413,17 +2413,17 @@ static void QuickSortSpans(
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
miClipSpans(
|
miClipSpans(
|
||||||
RegionPtr prgnDst,
|
RegionPtr prgnDst,
|
||||||
register DDXPointPtr ppt,
|
DDXPointPtr ppt,
|
||||||
register int *pwidth,
|
int *pwidth,
|
||||||
int nspans,
|
int nspans,
|
||||||
register DDXPointPtr pptNew,
|
DDXPointPtr pptNew,
|
||||||
int *pwidthNew,
|
int *pwidthNew,
|
||||||
int fSorted)
|
int fSorted)
|
||||||
{
|
{
|
||||||
register DDXPointPtr pptLast;
|
DDXPointPtr pptLast;
|
||||||
int *pwidthNewStart; /* the vengeance of Xerox! */
|
int *pwidthNewStart; /* the vengeance of Xerox! */
|
||||||
register int y, x1, x2;
|
int y, x1, x2;
|
||||||
register int numRects;
|
int numRects;
|
||||||
|
|
||||||
good(prgnDst);
|
good(prgnDst);
|
||||||
pptLast = ppt + nspans;
|
pptLast = ppt + nspans;
|
||||||
|
@ -2435,7 +2435,7 @@ miClipSpans(
|
||||||
/* It doesn't pay much to make use of fSorted in this case,
|
/* It doesn't pay much to make use of fSorted in this case,
|
||||||
so we lump everything together. */
|
so we lump everything together. */
|
||||||
|
|
||||||
register int clipx1, clipx2, clipy1, clipy2;
|
int clipx1, clipx2, clipy1, clipy2;
|
||||||
|
|
||||||
clipx1 = prgnDst->extents.x1;
|
clipx1 = prgnDst->extents.x1;
|
||||||
clipy1 = prgnDst->extents.y1;
|
clipy1 = prgnDst->extents.y1;
|
||||||
|
@ -2468,9 +2468,9 @@ miClipSpans(
|
||||||
{
|
{
|
||||||
/* Have to clip against many boxes */
|
/* Have to clip against many boxes */
|
||||||
BoxPtr pboxBandStart, pboxBandEnd;
|
BoxPtr pboxBandStart, pboxBandEnd;
|
||||||
register BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
register BoxPtr pboxLast;
|
BoxPtr pboxLast;
|
||||||
register int clipy1, clipy2;
|
int clipy1, clipy2;
|
||||||
|
|
||||||
/* In this case, taking advantage of sorted spans gains more than
|
/* In this case, taking advantage of sorted spans gains more than
|
||||||
the sorting costs. */
|
the sorting costs. */
|
||||||
|
@ -2493,7 +2493,7 @@ miClipSpans(
|
||||||
x2 = x1 + *pwidth;
|
x2 = x1 + *pwidth;
|
||||||
do
|
do
|
||||||
{ /* For each box in band */
|
{ /* For each box in band */
|
||||||
register int newx1, newx2;
|
int newx1, newx2;
|
||||||
|
|
||||||
newx1 = x1;
|
newx1 = x1;
|
||||||
newx2 = x2;
|
newx2 = x2;
|
||||||
|
@ -2531,10 +2531,10 @@ _X_EXPORT int
|
||||||
miFindMaxBand(prgn)
|
miFindMaxBand(prgn)
|
||||||
RegionPtr prgn;
|
RegionPtr prgn;
|
||||||
{
|
{
|
||||||
register int nbox;
|
int nbox;
|
||||||
register BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
register int nThisBand;
|
int nThisBand;
|
||||||
register int nMaxBand = 0;
|
int nMaxBand = 0;
|
||||||
short yThisBand;
|
short yThisBand;
|
||||||
|
|
||||||
good(prgn);
|
good(prgn);
|
||||||
|
|
|
@ -185,7 +185,7 @@ miCreateScreenResources(pScreen)
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
miScreenDevPrivateInit(pScreen, width, pbits)
|
miScreenDevPrivateInit(pScreen, width, pbits)
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
int width;
|
int width;
|
||||||
pointer pbits;
|
pointer pbits;
|
||||||
{
|
{
|
||||||
|
@ -207,7 +207,7 @@ miScreenDevPrivateInit(pScreen, width, pbits)
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
|
miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
|
||||||
rootDepth, numDepths, depths, rootVisual, numVisuals, visuals)
|
rootDepth, numDepths, depths, rootVisual, numVisuals, visuals)
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
pointer pbits; /* pointer to screen bits */
|
pointer pbits; /* pointer to screen bits */
|
||||||
int xsize, ysize; /* in pixels */
|
int xsize, ysize; /* in pixels */
|
||||||
int dpix, dpiy; /* dots per inch */
|
int dpix, dpiy; /* dots per inch */
|
||||||
|
|
50
mi/mispans.c
50
mi/mispans.c
|
@ -188,8 +188,8 @@ void miAppendSpans(spanGroup, otherGroup, spans)
|
||||||
SpanGroup *otherGroup;
|
SpanGroup *otherGroup;
|
||||||
Spans *spans;
|
Spans *spans;
|
||||||
{
|
{
|
||||||
register int ymin, ymax;
|
int ymin, ymax;
|
||||||
register int spansCount;
|
int spansCount;
|
||||||
|
|
||||||
spansCount = spans->count;
|
spansCount = spans->count;
|
||||||
if (spansCount > 0) {
|
if (spansCount > 0) {
|
||||||
|
@ -226,13 +226,13 @@ void miFreeSpanGroup(spanGroup)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void QuickSortSpansX(
|
static void QuickSortSpansX(
|
||||||
register DDXPointRec points[],
|
DDXPointRec points[],
|
||||||
register int widths[],
|
int widths[],
|
||||||
register int numSpans )
|
int numSpans )
|
||||||
{
|
{
|
||||||
register int x;
|
int x;
|
||||||
register int i, j, m;
|
int i, j, m;
|
||||||
register DDXPointPtr r;
|
DDXPointPtr r;
|
||||||
|
|
||||||
/* Always called with numSpans > 1 */
|
/* Always called with numSpans > 1 */
|
||||||
/* Sorts only by x, as all y should be the same */
|
/* Sorts only by x, as all y should be the same */
|
||||||
|
@ -240,7 +240,7 @@ static void QuickSortSpansX(
|
||||||
#define ExchangeSpans(a, b) \
|
#define ExchangeSpans(a, b) \
|
||||||
{ \
|
{ \
|
||||||
DDXPointRec tpt; \
|
DDXPointRec tpt; \
|
||||||
register int tw; \
|
int tw; \
|
||||||
\
|
\
|
||||||
tpt = points[a]; points[a] = points[b]; points[b] = tpt; \
|
tpt = points[a]; points[a] = points[b]; points[b] = tpt; \
|
||||||
tw = widths[a]; widths[a] = widths[b]; widths[b] = tw; \
|
tw = widths[a]; widths[a] = widths[b]; widths[b] = tw; \
|
||||||
|
@ -249,7 +249,7 @@ static void QuickSortSpansX(
|
||||||
do {
|
do {
|
||||||
if (numSpans < 9) {
|
if (numSpans < 9) {
|
||||||
/* Do insertion sort */
|
/* Do insertion sort */
|
||||||
register int xprev;
|
int xprev;
|
||||||
|
|
||||||
xprev = points[0].x;
|
xprev = points[0].x;
|
||||||
i = 1;
|
i = 1;
|
||||||
|
@ -314,12 +314,12 @@ static void QuickSortSpansX(
|
||||||
|
|
||||||
static int UniquifySpansX(
|
static int UniquifySpansX(
|
||||||
Spans *spans,
|
Spans *spans,
|
||||||
register DDXPointRec *newPoints,
|
DDXPointRec *newPoints,
|
||||||
register int *newWidths )
|
int *newWidths )
|
||||||
{
|
{
|
||||||
register int newx1, newx2, oldpt, i, y;
|
int newx1, newx2, oldpt, i, y;
|
||||||
register DDXPointRec *oldPoints;
|
DDXPointRec *oldPoints;
|
||||||
register int *oldWidths;
|
int *oldWidths;
|
||||||
int *startNewWidths;
|
int *startNewWidths;
|
||||||
|
|
||||||
/* Always called with numSpans > 1 */
|
/* Always called with numSpans > 1 */
|
||||||
|
@ -384,16 +384,16 @@ void miFillUniqueSpanGroup(pDraw, pGC, spanGroup)
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
SpanGroup *spanGroup;
|
SpanGroup *spanGroup;
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register Spans *spans;
|
Spans *spans;
|
||||||
register Spans *yspans;
|
Spans *yspans;
|
||||||
register int *ysizes;
|
int *ysizes;
|
||||||
register int ymin, ylength;
|
int ymin, ylength;
|
||||||
|
|
||||||
/* Outgoing spans for one big call to FillSpans */
|
/* Outgoing spans for one big call to FillSpans */
|
||||||
register DDXPointPtr points;
|
DDXPointPtr points;
|
||||||
register int *widths;
|
int *widths;
|
||||||
register int count;
|
int count;
|
||||||
|
|
||||||
if (spanGroup->count == 0) return;
|
if (spanGroup->count == 0) return;
|
||||||
|
|
||||||
|
@ -545,8 +545,8 @@ void miFillSpanGroup(pDraw, pGC, spanGroup)
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
SpanGroup *spanGroup;
|
SpanGroup *spanGroup;
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register Spans *spans;
|
Spans *spans;
|
||||||
|
|
||||||
for (i = 0, spans = spanGroup->group; i != spanGroup->count; i++, spans++) {
|
for (i = 0, spans = spanGroup->group; i != spanGroup->count; i++, spans++) {
|
||||||
(*pGC->ops->FillSpans)
|
(*pGC->ops->FillSpans)
|
||||||
|
|
|
@ -400,10 +400,10 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart)
|
||||||
|
|
||||||
if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp)
|
if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp)
|
||||||
{
|
{
|
||||||
register DDXPointPtr pts;
|
DDXPointPtr pts;
|
||||||
register int *widths;
|
int *widths;
|
||||||
register int nPts;
|
int nPts;
|
||||||
register int xorg,
|
int xorg,
|
||||||
yorg;
|
yorg;
|
||||||
|
|
||||||
xorg = pDrawable->x;
|
xorg = pDrawable->x;
|
||||||
|
|
|
@ -112,13 +112,13 @@ miShapedWindowIn (pScreen, universe, bounding, rect, x, y)
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
RegionPtr universe, bounding;
|
RegionPtr universe, bounding;
|
||||||
BoxPtr rect;
|
BoxPtr rect;
|
||||||
register int x, y;
|
int x, y;
|
||||||
{
|
{
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
register BoxPtr boundBox;
|
BoxPtr boundBox;
|
||||||
int nbox;
|
int nbox;
|
||||||
Bool someIn, someOut;
|
Bool someIn, someOut;
|
||||||
register int t, x1, y1, x2, y2;
|
int t, x1, y1, x2, y2;
|
||||||
|
|
||||||
nbox = REGION_NUM_RECTS (bounding);
|
nbox = REGION_NUM_RECTS (bounding);
|
||||||
boundBox = REGION_RECTS (bounding);
|
boundBox = REGION_RECTS (bounding);
|
||||||
|
@ -202,16 +202,16 @@ miRegisterRedirectBorderClipProc (SetRedirectBorderClipProcPtr setBorderClip,
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
miComputeClips (
|
miComputeClips (
|
||||||
register WindowPtr pParent,
|
WindowPtr pParent,
|
||||||
register ScreenPtr pScreen,
|
ScreenPtr pScreen,
|
||||||
register RegionPtr universe,
|
RegionPtr universe,
|
||||||
VTKind kind,
|
VTKind kind,
|
||||||
RegionPtr exposed ) /* for intermediate calculations */
|
RegionPtr exposed ) /* for intermediate calculations */
|
||||||
{
|
{
|
||||||
int dx,
|
int dx,
|
||||||
dy;
|
dy;
|
||||||
RegionRec childUniverse;
|
RegionRec childUniverse;
|
||||||
register WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
int oldVis, newVis;
|
int oldVis, newVis;
|
||||||
BoxRec borderSize;
|
BoxRec borderSize;
|
||||||
RegionRec childUnion;
|
RegionRec childUnion;
|
||||||
|
@ -535,10 +535,10 @@ miComputeClips (
|
||||||
|
|
||||||
static void
|
static void
|
||||||
miTreeObscured(
|
miTreeObscured(
|
||||||
register WindowPtr pParent )
|
WindowPtr pParent )
|
||||||
{
|
{
|
||||||
register WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
register int oldVis;
|
int oldVis;
|
||||||
|
|
||||||
pChild = pParent;
|
pChild = pParent;
|
||||||
while (1)
|
while (1)
|
||||||
|
@ -609,8 +609,8 @@ miValidateTree (pParent, pChild, kind)
|
||||||
RegionRec childUnion; /* the space covered by borderSize for
|
RegionRec childUnion; /* the space covered by borderSize for
|
||||||
* all marked children */
|
* all marked children */
|
||||||
RegionRec exposed; /* For intermediate calculations */
|
RegionRec exposed; /* For intermediate calculations */
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
Bool overlap;
|
Bool overlap;
|
||||||
int viewvals;
|
int viewvals;
|
||||||
Bool forward;
|
Bool forward;
|
||||||
|
|
102
mi/miwideline.c
102
mi/miwideline.c
|
@ -56,10 +56,10 @@ from The Open Group.
|
||||||
ICEILTEMPDECL
|
ICEILTEMPDECL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void miLineArc(DrawablePtr pDraw, register GCPtr pGC,
|
static void miLineArc(DrawablePtr pDraw, GCPtr pGC,
|
||||||
unsigned long pixel, SpanDataPtr spanData,
|
unsigned long pixel, SpanDataPtr spanData,
|
||||||
register LineFacePtr leftFace,
|
LineFacePtr leftFace,
|
||||||
register LineFacePtr rightFace,
|
LineFacePtr rightFace,
|
||||||
double xorg, double yorg, Bool isInt);
|
double xorg, double yorg, Bool isInt);
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,12 +79,12 @@ miFillPolyHelper (pDrawable, pGC, pixel, spanData, y, overall_height,
|
||||||
PolyEdgePtr left, right;
|
PolyEdgePtr left, right;
|
||||||
int left_count, right_count;
|
int left_count, right_count;
|
||||||
{
|
{
|
||||||
register int left_x = 0, left_e = 0;
|
int left_x = 0, left_e = 0;
|
||||||
int left_stepx = 0;
|
int left_stepx = 0;
|
||||||
int left_signdx = 0;
|
int left_signdx = 0;
|
||||||
int left_dy = 0, left_dx = 0;
|
int left_dy = 0, left_dx = 0;
|
||||||
|
|
||||||
register int right_x = 0, right_e = 0;
|
int right_x = 0, right_e = 0;
|
||||||
int right_stepx = 0;
|
int right_stepx = 0;
|
||||||
int right_signdx = 0;
|
int right_signdx = 0;
|
||||||
int right_dy = 0, right_dx = 0;
|
int right_dy = 0, right_dx = 0;
|
||||||
|
@ -92,9 +92,9 @@ miFillPolyHelper (pDrawable, pGC, pixel, spanData, y, overall_height,
|
||||||
int height = 0;
|
int height = 0;
|
||||||
int left_height = 0, right_height = 0;
|
int left_height = 0, right_height = 0;
|
||||||
|
|
||||||
register DDXPointPtr ppt;
|
DDXPointPtr ppt;
|
||||||
DDXPointPtr pptInit = NULL;
|
DDXPointPtr pptInit = NULL;
|
||||||
register int *pwidth;
|
int *pwidth;
|
||||||
int *pwidthInit = NULL;
|
int *pwidthInit = NULL;
|
||||||
XID oldPixel;
|
XID oldPixel;
|
||||||
int xorg;
|
int xorg;
|
||||||
|
@ -203,8 +203,8 @@ miFillRectPolyHelper (
|
||||||
int w,
|
int w,
|
||||||
int h)
|
int h)
|
||||||
{
|
{
|
||||||
register DDXPointPtr ppt;
|
DDXPointPtr ppt;
|
||||||
register int *pwidth;
|
int *pwidth;
|
||||||
XID oldPixel;
|
XID oldPixel;
|
||||||
Spans spanRec;
|
Spans spanRec;
|
||||||
xRectangle rect;
|
xRectangle rect;
|
||||||
|
@ -265,10 +265,10 @@ _X_EXPORT /* static */ int
|
||||||
miPolyBuildEdge (x0, y0, k, dx, dy, xi, yi, left, edge)
|
miPolyBuildEdge (x0, y0, k, dx, dy, xi, yi, left, edge)
|
||||||
double x0, y0;
|
double x0, y0;
|
||||||
double k; /* x0 * dy - y0 * dx */
|
double k; /* x0 * dy - y0 * dx */
|
||||||
register int dx, dy;
|
int dx, dy;
|
||||||
int xi, yi;
|
int xi, yi;
|
||||||
int left;
|
int left;
|
||||||
register PolyEdgePtr edge;
|
PolyEdgePtr edge;
|
||||||
{
|
{
|
||||||
int x, y, e;
|
int x, y, e;
|
||||||
int xady;
|
int xady;
|
||||||
|
@ -322,8 +322,8 @@ miPolyBuildEdge (x0, y0, k, dx, dy, xi, yi, left, edge)
|
||||||
|
|
||||||
_X_EXPORT /* static */ int
|
_X_EXPORT /* static */ int
|
||||||
miPolyBuildPoly (vertices, slopes, count, xi, yi, left, right, pnleft, pnright, h)
|
miPolyBuildPoly (vertices, slopes, count, xi, yi, left, right, pnleft, pnright, h)
|
||||||
register PolyVertexPtr vertices;
|
PolyVertexPtr vertices;
|
||||||
register PolySlopePtr slopes;
|
PolySlopePtr slopes;
|
||||||
int count;
|
int count;
|
||||||
int xi, yi;
|
int xi, yi;
|
||||||
PolyEdgePtr left, right;
|
PolyEdgePtr left, right;
|
||||||
|
@ -332,12 +332,12 @@ miPolyBuildPoly (vertices, slopes, count, xi, yi, left, right, pnleft, pnright,
|
||||||
{
|
{
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
double miny, maxy;
|
double miny, maxy;
|
||||||
register int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
int clockwise;
|
int clockwise;
|
||||||
int slopeoff;
|
int slopeoff;
|
||||||
register int s;
|
int s;
|
||||||
register int nright, nleft;
|
int nright, nleft;
|
||||||
int y, lasty = 0, bottomy, topy = 0;
|
int y, lasty = 0, bottomy, topy = 0;
|
||||||
|
|
||||||
/* find the top of the polygon */
|
/* find the top of the polygon */
|
||||||
|
@ -471,8 +471,8 @@ miLineJoin (
|
||||||
GCPtr pGC,
|
GCPtr pGC,
|
||||||
unsigned long pixel,
|
unsigned long pixel,
|
||||||
SpanDataPtr spanData,
|
SpanDataPtr spanData,
|
||||||
register LineFacePtr pLeft,
|
LineFacePtr pLeft,
|
||||||
register LineFacePtr pRight)
|
LineFacePtr pRight)
|
||||||
{
|
{
|
||||||
double mx = 0, my = 0;
|
double mx = 0, my = 0;
|
||||||
double denom = 0.0;
|
double denom = 0.0;
|
||||||
|
@ -624,9 +624,9 @@ miLineArcI (
|
||||||
DDXPointPtr points,
|
DDXPointPtr points,
|
||||||
int *widths)
|
int *widths)
|
||||||
{
|
{
|
||||||
register DDXPointPtr tpts, bpts;
|
DDXPointPtr tpts, bpts;
|
||||||
register int *twids, *bwids;
|
int *twids, *bwids;
|
||||||
register int x, y, e, ex, slw;
|
int x, y, e, ex, slw;
|
||||||
|
|
||||||
tpts = points;
|
tpts = points;
|
||||||
twids = widths;
|
twids = widths;
|
||||||
|
@ -717,8 +717,8 @@ miLineArcD (
|
||||||
int edgey2,
|
int edgey2,
|
||||||
Bool edgeleft2)
|
Bool edgeleft2)
|
||||||
{
|
{
|
||||||
register DDXPointPtr pts;
|
DDXPointPtr pts;
|
||||||
register int *wids;
|
int *wids;
|
||||||
double radius, x0, y0, el, er, yk, xlk, xrk, k;
|
double radius, x0, y0, el, er, yk, xlk, xrk, k;
|
||||||
int xbase, ybase, y, boty, xl, xr, xcl, xcr;
|
int xbase, ybase, y, boty, xl, xr, xcl, xcr;
|
||||||
int ymin, ymax;
|
int ymin, ymax;
|
||||||
|
@ -875,8 +875,8 @@ miLineArcD (
|
||||||
|
|
||||||
int
|
int
|
||||||
miRoundJoinFace (face, edge, leftEdge)
|
miRoundJoinFace (face, edge, leftEdge)
|
||||||
register LineFacePtr face;
|
LineFacePtr face;
|
||||||
register PolyEdgePtr edge;
|
PolyEdgePtr edge;
|
||||||
Bool *leftEdge;
|
Bool *leftEdge;
|
||||||
{
|
{
|
||||||
int y;
|
int y;
|
||||||
|
@ -924,7 +924,7 @@ miRoundJoinFace (face, edge, leftEdge)
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miRoundJoinClip (pLeft, pRight, edge1, edge2, y1, y2, left1, left2)
|
miRoundJoinClip (pLeft, pRight, edge1, edge2, y1, y2, left1, left2)
|
||||||
register LineFacePtr pLeft, pRight;
|
LineFacePtr pLeft, pRight;
|
||||||
PolyEdgePtr edge1, edge2;
|
PolyEdgePtr edge1, edge2;
|
||||||
int *y1, *y2;
|
int *y1, *y2;
|
||||||
Bool *left1, *left2;
|
Bool *left1, *left2;
|
||||||
|
@ -949,13 +949,13 @@ miRoundJoinClip (pLeft, pRight, edge1, edge2, y1, y2, left1, left2)
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
miRoundCapClip (face, isInt, edge, leftEdge)
|
miRoundCapClip (face, isInt, edge, leftEdge)
|
||||||
register LineFacePtr face;
|
LineFacePtr face;
|
||||||
Bool isInt;
|
Bool isInt;
|
||||||
register PolyEdgePtr edge;
|
PolyEdgePtr edge;
|
||||||
Bool *leftEdge;
|
Bool *leftEdge;
|
||||||
{
|
{
|
||||||
int y;
|
int y;
|
||||||
register int dx, dy;
|
int dx, dy;
|
||||||
double xa, ya, k;
|
double xa, ya, k;
|
||||||
Bool left;
|
Bool left;
|
||||||
|
|
||||||
|
@ -1000,11 +1000,11 @@ miRoundCapClip (face, isInt, edge, leftEdge)
|
||||||
static void
|
static void
|
||||||
miLineArc (
|
miLineArc (
|
||||||
DrawablePtr pDraw,
|
DrawablePtr pDraw,
|
||||||
register GCPtr pGC,
|
GCPtr pGC,
|
||||||
unsigned long pixel,
|
unsigned long pixel,
|
||||||
SpanDataPtr spanData,
|
SpanDataPtr spanData,
|
||||||
register LineFacePtr leftFace,
|
LineFacePtr leftFace,
|
||||||
register LineFacePtr rightFace,
|
LineFacePtr rightFace,
|
||||||
double xorg,
|
double xorg,
|
||||||
double yorg,
|
double yorg,
|
||||||
Bool isInt)
|
Bool isInt)
|
||||||
|
@ -1117,10 +1117,10 @@ miLineArc (
|
||||||
void
|
void
|
||||||
miLineProjectingCap (pDrawable, pGC, pixel, spanData, face, isLeft, xorg, yorg, isInt)
|
miLineProjectingCap (pDrawable, pGC, pixel, spanData, face, isLeft, xorg, yorg, isInt)
|
||||||
DrawablePtr pDrawable;
|
DrawablePtr pDrawable;
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
unsigned long pixel;
|
unsigned long pixel;
|
||||||
SpanDataPtr spanData;
|
SpanDataPtr spanData;
|
||||||
register LineFacePtr face;
|
LineFacePtr face;
|
||||||
Bool isLeft;
|
Bool isLeft;
|
||||||
double xorg, yorg;
|
double xorg, yorg;
|
||||||
Bool isInt;
|
Bool isInt;
|
||||||
|
@ -1290,14 +1290,14 @@ miWideSegment (
|
||||||
GCPtr pGC,
|
GCPtr pGC,
|
||||||
unsigned long pixel,
|
unsigned long pixel,
|
||||||
SpanDataPtr spanData,
|
SpanDataPtr spanData,
|
||||||
register int x1,
|
int x1,
|
||||||
register int y1,
|
int y1,
|
||||||
register int x2,
|
int x2,
|
||||||
register int y2,
|
int y2,
|
||||||
Bool projectLeft,
|
Bool projectLeft,
|
||||||
Bool projectRight,
|
Bool projectRight,
|
||||||
register LineFacePtr leftFace,
|
LineFacePtr leftFace,
|
||||||
register LineFacePtr rightFace)
|
LineFacePtr rightFace)
|
||||||
{
|
{
|
||||||
double l, L, r;
|
double l, L, r;
|
||||||
double xa, ya;
|
double xa, ya;
|
||||||
|
@ -1508,7 +1508,7 @@ miWideSegment (
|
||||||
|
|
||||||
SpanDataPtr
|
SpanDataPtr
|
||||||
miSetupSpanData (pGC, spanData, npt)
|
miSetupSpanData (pGC, spanData, npt)
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
SpanDataPtr spanData;
|
SpanDataPtr spanData;
|
||||||
int npt;
|
int npt;
|
||||||
{
|
{
|
||||||
|
@ -1552,19 +1552,19 @@ miCleanupSpanData (pDrawable, pGC, spanData)
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miWideLine (pDrawable, pGC, mode, npt, pPts)
|
miWideLine (pDrawable, pGC, mode, npt, pPts)
|
||||||
DrawablePtr pDrawable;
|
DrawablePtr pDrawable;
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
int mode;
|
int mode;
|
||||||
register int npt;
|
int npt;
|
||||||
register DDXPointPtr pPts;
|
DDXPointPtr pPts;
|
||||||
{
|
{
|
||||||
int x1, y1, x2, y2;
|
int x1, y1, x2, y2;
|
||||||
SpanDataRec spanDataRec;
|
SpanDataRec spanDataRec;
|
||||||
SpanDataPtr spanData;
|
SpanDataPtr spanData;
|
||||||
unsigned long pixel;
|
long pixel;
|
||||||
Bool projectLeft, projectRight;
|
Bool projectLeft, projectRight;
|
||||||
LineFaceRec leftFace, rightFace, prevRightFace;
|
LineFaceRec leftFace, rightFace, prevRightFace;
|
||||||
LineFaceRec firstFace;
|
LineFaceRec firstFace;
|
||||||
register int first;
|
int first;
|
||||||
Bool somethingDrawn = FALSE;
|
Bool somethingDrawn = FALSE;
|
||||||
Bool selfJoin;
|
Bool selfJoin;
|
||||||
|
|
||||||
|
@ -1693,7 +1693,7 @@ miWideLine (pDrawable, pGC, mode, npt, pPts)
|
||||||
static void
|
static void
|
||||||
miWideDashSegment (
|
miWideDashSegment (
|
||||||
DrawablePtr pDrawable,
|
DrawablePtr pDrawable,
|
||||||
register GCPtr pGC,
|
GCPtr pGC,
|
||||||
SpanDataPtr spanData,
|
SpanDataPtr spanData,
|
||||||
int *pDashOffset,
|
int *pDashOffset,
|
||||||
int *pDashIndex,
|
int *pDashIndex,
|
||||||
|
@ -2050,10 +2050,10 @@ miWideDashSegment (
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miWideDash (pDrawable, pGC, mode, npt, pPts)
|
miWideDash (pDrawable, pGC, mode, npt, pPts)
|
||||||
DrawablePtr pDrawable;
|
DrawablePtr pDrawable;
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
int mode;
|
int mode;
|
||||||
register int npt;
|
int npt;
|
||||||
register DDXPointPtr pPts;
|
DDXPointPtr pPts;
|
||||||
{
|
{
|
||||||
int x1, y1, x2, y2;
|
int x1, y1, x2, y2;
|
||||||
unsigned long pixel;
|
unsigned long pixel;
|
||||||
|
@ -2062,7 +2062,7 @@ miWideDash (pDrawable, pGC, mode, npt, pPts)
|
||||||
LineFaceRec firstFace;
|
LineFaceRec firstFace;
|
||||||
int first;
|
int first;
|
||||||
int dashIndex, dashOffset;
|
int dashIndex, dashOffset;
|
||||||
register int prevDashIndex;
|
int prevDashIndex;
|
||||||
SpanDataRec spanDataRec;
|
SpanDataRec spanDataRec;
|
||||||
SpanDataPtr spanData;
|
SpanDataPtr spanData;
|
||||||
Bool somethingDrawn = FALSE;
|
Bool somethingDrawn = FALSE;
|
||||||
|
|
|
@ -160,12 +160,12 @@ miClearToBackground(pWin, x, y, w, h, generateExposures)
|
||||||
*/
|
*/
|
||||||
static Bool
|
static Bool
|
||||||
miCheckSubSaveUnder(
|
miCheckSubSaveUnder(
|
||||||
register WindowPtr pParent, /* Parent to check */
|
WindowPtr pParent, /* Parent to check */
|
||||||
WindowPtr pFirst, /* first reconfigured window */
|
WindowPtr pFirst, /* first reconfigured window */
|
||||||
RegionPtr pRegion) /* Initial area obscured by saveUnder */
|
RegionPtr pRegion) /* Initial area obscured by saveUnder */
|
||||||
{
|
{
|
||||||
register WindowPtr pChild; /* Current child */
|
WindowPtr pChild; /* Current child */
|
||||||
register ScreenPtr pScreen; /* Screen to use */
|
ScreenPtr pScreen; /* Screen to use */
|
||||||
RegionRec SubRegion; /* Area of children obscured */
|
RegionRec SubRegion; /* Area of children obscured */
|
||||||
Bool res = FALSE; /* result */
|
Bool res = FALSE; /* result */
|
||||||
Bool subInited=FALSE;/* SubRegion initialized */
|
Bool subInited=FALSE;/* SubRegion initialized */
|
||||||
|
@ -268,12 +268,12 @@ miCheckSubSaveUnder(
|
||||||
*/
|
*/
|
||||||
Bool
|
Bool
|
||||||
miChangeSaveUnder(pWin, first)
|
miChangeSaveUnder(pWin, first)
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
WindowPtr first; /* First window to check.
|
WindowPtr first; /* First window to check.
|
||||||
* Used when pWin was restacked */
|
* Used when pWin was restacked */
|
||||||
{
|
{
|
||||||
RegionRec rgn; /* Area obscured by saveUnder windows */
|
RegionRec rgn; /* Area obscured by saveUnder windows */
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
Bool res;
|
Bool res;
|
||||||
|
|
||||||
if (!deltaSaveUndersViewable && !numSaveUndersViewable)
|
if (!deltaSaveUndersViewable && !numSaveUndersViewable)
|
||||||
|
@ -309,7 +309,7 @@ miPostChangeSaveUnder(pWin, pFirst)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
WindowPtr pFirst;
|
WindowPtr pFirst;
|
||||||
{
|
{
|
||||||
register WindowPtr pParent, pChild;
|
WindowPtr pParent, pChild;
|
||||||
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
||||||
|
|
||||||
if (!(pParent = pWin->parent))
|
if (!(pParent = pWin->parent))
|
||||||
|
@ -342,9 +342,9 @@ miPostChangeSaveUnder(pWin, pFirst)
|
||||||
|
|
||||||
void
|
void
|
||||||
miMarkWindow(pWin)
|
miMarkWindow(pWin)
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
{
|
{
|
||||||
register ValidatePtr val;
|
ValidatePtr val;
|
||||||
|
|
||||||
if (pWin->valdata)
|
if (pWin->valdata)
|
||||||
return;
|
return;
|
||||||
|
@ -362,8 +362,8 @@ miMarkOverlappedWindows(pWin, pFirst, ppLayerWin)
|
||||||
WindowPtr pFirst;
|
WindowPtr pFirst;
|
||||||
WindowPtr *ppLayerWin;
|
WindowPtr *ppLayerWin;
|
||||||
{
|
{
|
||||||
register BoxPtr box;
|
BoxPtr box;
|
||||||
register WindowPtr pChild, pLast;
|
WindowPtr pChild, pLast;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
MarkWindowProcPtr MarkWindow = pWin->drawable.pScreen->MarkWindow;
|
MarkWindowProcPtr MarkWindow = pWin->drawable.pScreen->MarkWindow;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
@ -449,8 +449,8 @@ _X_EXPORT void
|
||||||
miHandleValidateExposures(pWin)
|
miHandleValidateExposures(pWin)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
{
|
{
|
||||||
register WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
register ValidatePtr val;
|
ValidatePtr val;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ miHandleValidateExposures(pWin)
|
||||||
|
|
||||||
void
|
void
|
||||||
miMoveWindow(pWin, x, y, pNextSib, kind)
|
miMoveWindow(pWin, x, y, pNextSib, kind)
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
int x,y;
|
int x,y;
|
||||||
WindowPtr pNextSib;
|
WindowPtr pNextSib;
|
||||||
VTKind kind;
|
VTKind kind;
|
||||||
|
@ -498,7 +498,7 @@ miMoveWindow(pWin, x, y, pNextSib, kind)
|
||||||
RegionPtr oldRegion = NULL;
|
RegionPtr oldRegion = NULL;
|
||||||
DDXPointRec oldpt;
|
DDXPointRec oldpt;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
WindowPtr windowToValidate;
|
WindowPtr windowToValidate;
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
Bool dosave = FALSE;
|
Bool dosave = FALSE;
|
||||||
|
@ -576,10 +576,10 @@ miMoveWindow(pWin, x, y, pNextSib, kind)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
miRecomputeExposures (
|
miRecomputeExposures (
|
||||||
register WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
pointer value) /* must conform to VisitWindowProcPtr */
|
pointer value) /* must conform to VisitWindowProcPtr */
|
||||||
{
|
{
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
RegionPtr pValid = (RegionPtr)value;
|
RegionPtr pValid = (RegionPtr)value;
|
||||||
|
|
||||||
if (pWin->valdata)
|
if (pWin->valdata)
|
||||||
|
@ -604,7 +604,7 @@ miRecomputeExposures (
|
||||||
|
|
||||||
void
|
void
|
||||||
miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
|
miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
int x,y;
|
int x,y;
|
||||||
unsigned int w, h;
|
unsigned int w, h;
|
||||||
WindowPtr pSib;
|
WindowPtr pSib;
|
||||||
|
@ -620,11 +620,11 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
|
||||||
DDXPointRec oldpt;
|
DDXPointRec oldpt;
|
||||||
RegionPtr oldRegion = NULL;
|
RegionPtr oldRegion = NULL;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
WindowPtr pFirstChange;
|
WindowPtr pFirstChange;
|
||||||
register WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
RegionPtr gravitate[StaticGravity + 1];
|
RegionPtr gravitate[StaticGravity + 1];
|
||||||
register unsigned g;
|
unsigned g;
|
||||||
int nx, ny; /* destination x,y */
|
int nx, ny; /* destination x,y */
|
||||||
int newx, newy; /* new inner window position */
|
int newx, newy; /* new inner window position */
|
||||||
RegionPtr pRegion = NULL;
|
RegionPtr pRegion = NULL;
|
||||||
|
@ -981,10 +981,10 @@ miGetLayerWindow(pWin)
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miSetShape(pWin)
|
miSetShape(pWin)
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
{
|
{
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
register ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
RegionPtr pOldClip = NULL, bsExposed;
|
RegionPtr pOldClip = NULL, bsExposed;
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
|
@ -1081,12 +1081,12 @@ miSetShape(pWin)
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miChangeBorderWidth(pWin, width)
|
miChangeBorderWidth(pWin, width)
|
||||||
register WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
unsigned int width;
|
unsigned int width;
|
||||||
{
|
{
|
||||||
int oldwidth;
|
int oldwidth;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
register ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
Bool HadBorder;
|
Bool HadBorder;
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
|
|
|
@ -97,8 +97,8 @@ static miZeroArcPtRec oob = {65536, 65536, 0};
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miZeroArcSetup(arc, info, ok360)
|
miZeroArcSetup(arc, info, ok360)
|
||||||
register xArc *arc;
|
xArc *arc;
|
||||||
register miZeroArcRec *info;
|
miZeroArcRec *info;
|
||||||
Bool ok360;
|
Bool ok360;
|
||||||
{
|
{
|
||||||
int l;
|
int l;
|
||||||
|
@ -404,11 +404,11 @@ miZeroArcSetup(arc, info, ok360)
|
||||||
DDXPointPtr
|
DDXPointPtr
|
||||||
miZeroArcPts(arc, pts)
|
miZeroArcPts(arc, pts)
|
||||||
xArc *arc;
|
xArc *arc;
|
||||||
register DDXPointPtr pts;
|
DDXPointPtr pts;
|
||||||
{
|
{
|
||||||
miZeroArcRec info;
|
miZeroArcRec info;
|
||||||
register int x, y, a, b, d, mask;
|
int x, y, a, b, d, mask;
|
||||||
register int k1, k3, dx, dy;
|
int k1, k3, dx, dy;
|
||||||
Bool do360;
|
Bool do360;
|
||||||
|
|
||||||
do360 = miZeroArcSetup(arc, &info, TRUE);
|
do360 = miZeroArcSetup(arc, &info, TRUE);
|
||||||
|
@ -509,14 +509,14 @@ miZeroArcDashPts(
|
||||||
GCPtr pGC,
|
GCPtr pGC,
|
||||||
xArc *arc,
|
xArc *arc,
|
||||||
DashInfo *dinfo,
|
DashInfo *dinfo,
|
||||||
register DDXPointPtr points,
|
DDXPointPtr points,
|
||||||
int maxPts,
|
int maxPts,
|
||||||
register DDXPointPtr *evenPts,
|
DDXPointPtr *evenPts,
|
||||||
register DDXPointPtr *oddPts )
|
DDXPointPtr *oddPts )
|
||||||
{
|
{
|
||||||
miZeroArcRec info;
|
miZeroArcRec info;
|
||||||
register int x, y, a, b, d, mask;
|
int x, y, a, b, d, mask;
|
||||||
register int k1, k3, dx, dy;
|
int k1, k3, dx, dy;
|
||||||
int dashRemaining;
|
int dashRemaining;
|
||||||
DDXPointPtr arcPts[4];
|
DDXPointPtr arcPts[4];
|
||||||
DDXPointPtr startPts[5], endPts[5];
|
DDXPointPtr startPts[5], endPts[5];
|
||||||
|
@ -715,11 +715,11 @@ miZeroPolyArc(pDraw, pGC, narcs, parcs)
|
||||||
xArc *parcs;
|
xArc *parcs;
|
||||||
{
|
{
|
||||||
int maxPts = 0;
|
int maxPts = 0;
|
||||||
register int n, maxw = 0;
|
int n, maxw = 0;
|
||||||
register xArc *arc;
|
xArc *arc;
|
||||||
register int i;
|
int i;
|
||||||
DDXPointPtr points, pts, oddPts;
|
DDXPointPtr points, pts, oddPts;
|
||||||
register DDXPointPtr pt;
|
DDXPointPtr pt;
|
||||||
int numPts;
|
int numPts;
|
||||||
Bool dospans;
|
Bool dospans;
|
||||||
int *widths = NULL;
|
int *widths = NULL;
|
||||||
|
|
|
@ -490,7 +490,7 @@ RRCrtcInit (void)
|
||||||
int
|
int
|
||||||
ProcRRGetCrtcInfo (ClientPtr client)
|
ProcRRGetCrtcInfo (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xRRGetCrtcInfoReq);;
|
REQUEST(xRRGetCrtcInfoReq);
|
||||||
xRRGetCrtcInfoReply rep;
|
xRRGetCrtcInfoReply rep;
|
||||||
RRCrtcPtr crtc;
|
RRCrtcPtr crtc;
|
||||||
CARD8 *extra;
|
CARD8 *extra;
|
||||||
|
|
|
@ -22,6 +22,9 @@
|
||||||
|
|
||||||
#include "randrstr.h"
|
#include "randrstr.h"
|
||||||
|
|
||||||
|
#define SERVER_RANDR_MAJOR 1
|
||||||
|
#define SERVER_RANDR_MINOR 2
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
RRClientKnowsRates (ClientPtr pClient)
|
RRClientKnowsRates (ClientPtr pClient)
|
||||||
{
|
{
|
||||||
|
@ -49,8 +52,8 @@ ProcRRQueryVersion (ClientPtr client)
|
||||||
* Report the current version; the current
|
* Report the current version; the current
|
||||||
* spec says they're all compatible after 1.0
|
* spec says they're all compatible after 1.0
|
||||||
*/
|
*/
|
||||||
rep.majorVersion = RANDR_MAJOR;
|
rep.majorVersion = SERVER_RANDR_MAJOR;
|
||||||
rep.minorVersion = RANDR_MINOR;
|
rep.minorVersion = SERVER_RANDR_MINOR;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
|
|
@ -366,7 +366,7 @@ RROutputInit (void)
|
||||||
int
|
int
|
||||||
ProcRRGetOutputInfo (ClientPtr client)
|
ProcRRGetOutputInfo (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xRRGetOutputInfoReq);;
|
REQUEST(xRRGetOutputInfoReq);
|
||||||
xRRGetOutputInfoReply rep;
|
xRRGetOutputInfoReply rep;
|
||||||
RROutputPtr output;
|
RROutputPtr output;
|
||||||
CARD8 *extra;
|
CARD8 *extra;
|
||||||
|
|
|
@ -104,7 +104,7 @@ void
|
||||||
RRPointerMoved (ScreenPtr pScreen, int x, int y)
|
RRPointerMoved (ScreenPtr pScreen, int x, int y)
|
||||||
{
|
{
|
||||||
rrScrPriv (pScreen);
|
rrScrPriv (pScreen);
|
||||||
RRCrtcPtr pointerCrtc = pScrPriv->pointerCrtc;;
|
RRCrtcPtr pointerCrtc = pScrPriv->pointerCrtc;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
/* Check last known CRTC */
|
/* Check last known CRTC */
|
||||||
|
|
Loading…
Reference in New Issue