mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-22 01:20:26 +00:00
Merge branch 'master' into mpx
Conflicts: Xi/closedev.c Xi/exevents.c Xi/extinit.c Xi/listdev.c dix/window.c hw/xfree86/common/xf86Xinput.c include/extinit.h mi/mipointer.c
This commit is contained in:
commit
e8777a91f3
280 changed files with 4649 additions and 5825 deletions
|
|
@ -67,7 +67,7 @@ SOFTWARE.
|
|||
#define XKB_IN_SERVER
|
||||
#endif
|
||||
#ifdef XKB
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#include <xkbsrv.h>
|
||||
#endif
|
||||
#include "xace.h"
|
||||
|
||||
|
|
@ -79,7 +79,8 @@ SOFTWARE.
|
|||
#include "exglobals.h"
|
||||
#include "exevents.h"
|
||||
|
||||
int CoreDevicePrivatesIndex = 0, CoreDevicePrivatesGeneration = -1;
|
||||
int CoreDevicePrivatesIndex = 0;
|
||||
static int CoreDevicePrivatesGeneration = -1;
|
||||
|
||||
/* The client that is allowed to change pointer-keyboard pairings. */
|
||||
static ClientPtr pairingClient = NULL;
|
||||
|
|
@ -994,16 +995,16 @@ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
|
|||
}
|
||||
|
||||
|
||||
LedCtrl defaultLedControl = {
|
||||
static LedCtrl defaultLedControl = {
|
||||
DEFAULT_LEDS, DEFAULT_LEDS_MASK, 0};
|
||||
|
||||
BellCtrl defaultBellControl = {
|
||||
static BellCtrl defaultBellControl = {
|
||||
DEFAULT_BELL,
|
||||
DEFAULT_BELL_PITCH,
|
||||
DEFAULT_BELL_DURATION,
|
||||
0};
|
||||
|
||||
IntegerCtrl defaultIntegerControl = {
|
||||
static IntegerCtrl defaultIntegerControl = {
|
||||
DEFAULT_INT_RESOLUTION,
|
||||
DEFAULT_INT_MIN_VALUE,
|
||||
DEFAULT_INT_MAX_VALUE,
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ int ProcInitialConnection();
|
|||
#define XKB_IN_SERVER
|
||||
#endif
|
||||
#include "inputstr.h"
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#include <xkbsrv.h>
|
||||
#endif
|
||||
|
||||
#ifdef XSERVER_DTRACE
|
||||
|
|
@ -297,9 +297,8 @@ long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL;
|
|||
long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL;
|
||||
long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE;
|
||||
long SmartScheduleTime;
|
||||
ClientPtr SmartLastClient;
|
||||
int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1];
|
||||
int SmartScheduleClient(int *clientReady, int nready);
|
||||
static ClientPtr SmartLastClient;
|
||||
static int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1];
|
||||
|
||||
#ifdef SMART_DEBUG
|
||||
long SmartLastPrint;
|
||||
|
|
@ -308,7 +307,7 @@ long SmartLastPrint;
|
|||
void Dispatch(void);
|
||||
void InitProcVectors(void);
|
||||
|
||||
int
|
||||
static int
|
||||
SmartScheduleClient (int *clientReady, int nready)
|
||||
{
|
||||
ClientPtr pClient;
|
||||
|
|
@ -834,7 +833,7 @@ ProcCirculateWindow(ClientPtr client)
|
|||
return(client->noClientException);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
GetGeometry(ClientPtr client, xGetGeometryReply *rep)
|
||||
{
|
||||
DrawablePtr pDraw;
|
||||
|
|
@ -1804,8 +1803,6 @@ ProcCopyArea(ClientPtr client)
|
|||
else
|
||||
pSrc = pDst;
|
||||
|
||||
SET_DBE_SRCBUF(pSrc, stuff->srcDrawable);
|
||||
|
||||
pRgn = (*pGC->ops->CopyArea)(pSrc, pDst, pGC, stuff->srcX, stuff->srcY,
|
||||
stuff->width, stuff->height,
|
||||
stuff->dstX, stuff->dstY);
|
||||
|
|
@ -1848,8 +1845,6 @@ ProcCopyPlane(ClientPtr client)
|
|||
else
|
||||
psrcDraw = pdstDraw;
|
||||
|
||||
SET_DBE_SRCBUF(psrcDraw, stuff->srcDrawable);
|
||||
|
||||
/* Check to see if stuff->bitPlane has exactly ONE good bit set */
|
||||
if(stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) ||
|
||||
(stuff->bitPlane > (1L << (psrcDraw->depth - 1))))
|
||||
|
|
@ -2157,8 +2152,7 @@ ProcPutImage(ClientPtr client)
|
|||
return (client->noClientException);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
DoGetImage(ClientPtr client, int format, Drawable drawable,
|
||||
int x, int y, int width, int height,
|
||||
Mask planemask, xGetImageReply **im_return)
|
||||
|
|
@ -2210,8 +2204,6 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
|
|||
xgi.visual = None;
|
||||
}
|
||||
|
||||
SET_DBE_SRCBUF(pDraw, drawable);
|
||||
|
||||
xgi.type = X_Reply;
|
||||
xgi.sequenceNumber = client->sequence;
|
||||
xgi.depth = pDraw->depth;
|
||||
|
|
@ -3383,6 +3375,28 @@ ProcChangeAccessControl(ClientPtr client)
|
|||
return (result);
|
||||
}
|
||||
|
||||
/*********************
|
||||
* CloseDownRetainedResources
|
||||
*
|
||||
* Find all clients that are gone and have terminated in RetainTemporary
|
||||
* and destroy their resources.
|
||||
*********************/
|
||||
|
||||
static void
|
||||
CloseDownRetainedResources(void)
|
||||
{
|
||||
int i;
|
||||
ClientPtr client;
|
||||
|
||||
for (i=1; i<currentMaxClients; i++)
|
||||
{
|
||||
client = clients[i];
|
||||
if (client && (client->closeDownMode == RetainTemporary)
|
||||
&& (client->clientGone))
|
||||
CloseDownClient(client);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ProcKillClient(ClientPtr client)
|
||||
{
|
||||
|
|
@ -3653,28 +3667,6 @@ KillAllClients()
|
|||
}
|
||||
}
|
||||
|
||||
/*********************
|
||||
* CloseDownRetainedResources
|
||||
*
|
||||
* Find all clients that are gone and have terminated in RetainTemporary
|
||||
* and destroy their resources.
|
||||
*********************/
|
||||
|
||||
void
|
||||
CloseDownRetainedResources()
|
||||
{
|
||||
int i;
|
||||
ClientPtr client;
|
||||
|
||||
for (i=1; i<currentMaxClients; i++)
|
||||
{
|
||||
client = clients[i];
|
||||
if (client && (client->closeDownMode == RetainTemporary)
|
||||
&& (client->clientGone))
|
||||
CloseDownClient(client);
|
||||
}
|
||||
}
|
||||
|
||||
extern int clientPrivateLen;
|
||||
extern unsigned *clientPrivateSizes;
|
||||
extern unsigned totalClientSize;
|
||||
|
|
|
|||
|
|
@ -882,9 +882,7 @@ static CallbackFuncsRec default_cbfuncs =
|
|||
_DeleteCallbackList
|
||||
};
|
||||
|
||||
/* ===== Public Procedures ===== */
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
|
||||
{
|
||||
CallbackListPtr cbl;
|
||||
|
|
@ -916,6 +914,8 @@ CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* ===== Public Procedures ===== */
|
||||
|
||||
_X_EXPORT Bool
|
||||
AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ of the copyright holder.
|
|||
|
||||
#ifdef XKB
|
||||
#include <X11/extensions/XKBproto.h>
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#include <xkbsrv.h>
|
||||
extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
|
||||
#endif
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ extern Mask xevieFilters[128];
|
|||
extern int xevieEventSent;
|
||||
extern int xevieKBEventSent;
|
||||
int xeviegrabState = 0;
|
||||
xEvent *xeviexE;
|
||||
static xEvent *xeviexE;
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
|
|
|||
|
|
@ -66,8 +66,6 @@ SOFTWARE.
|
|||
#define LAST_EVENT 128
|
||||
#define LAST_ERROR 255
|
||||
|
||||
ScreenProcEntry AuxillaryScreenProcs[MAXSCREENS];
|
||||
|
||||
static ExtensionEntry **extensions = (ExtensionEntry **)NULL;
|
||||
|
||||
int lastEvent = EXTENSION_EVENT_BASE;
|
||||
|
|
@ -298,21 +296,8 @@ CloseDownExtensions()
|
|||
extensions = (ExtensionEntry **)NULL;
|
||||
lastEvent = EXTENSION_EVENT_BASE;
|
||||
lastError = FirstExtensionError;
|
||||
for (i=0; i<MAXSCREENS; i++)
|
||||
{
|
||||
ScreenProcEntry *spentry = &AuxillaryScreenProcs[i];
|
||||
|
||||
while (spentry->num)
|
||||
{
|
||||
spentry->num--;
|
||||
xfree(spentry->procList[spentry->num].name);
|
||||
}
|
||||
xfree(spentry->procList);
|
||||
spentry->procList = (ProcEntryPtr)NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ProcQueryExtension(ClientPtr client)
|
||||
{
|
||||
|
|
@ -406,72 +391,6 @@ ProcListExtensions(ClientPtr client)
|
|||
return(client->noClientException);
|
||||
}
|
||||
|
||||
|
||||
ExtensionLookupProc
|
||||
LookupProc(char *name, GCPtr pGC)
|
||||
{
|
||||
int i;
|
||||
ScreenProcEntry *spentry;
|
||||
spentry = &AuxillaryScreenProcs[pGC->pScreen->myNum];
|
||||
if (spentry->num)
|
||||
{
|
||||
for (i = 0; i < spentry->num; i++)
|
||||
if (strcmp(name, spentry->procList[i].name) == 0)
|
||||
return(spentry->procList[i].proc);
|
||||
}
|
||||
return (ExtensionLookupProc)NULL;
|
||||
}
|
||||
|
||||
Bool
|
||||
RegisterProc(char *name, GC *pGC, ExtensionLookupProc proc)
|
||||
{
|
||||
return RegisterScreenProc(name, pGC->pScreen, proc);
|
||||
}
|
||||
|
||||
Bool
|
||||
RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc)
|
||||
{
|
||||
ScreenProcEntry *spentry;
|
||||
ProcEntryPtr procEntry = (ProcEntryPtr)NULL;
|
||||
char *newname;
|
||||
int i;
|
||||
|
||||
spentry = &AuxillaryScreenProcs[pScreen->myNum];
|
||||
/* first replace duplicates */
|
||||
if (spentry->num)
|
||||
{
|
||||
for (i = 0; i < spentry->num; i++)
|
||||
if (strcmp(name, spentry->procList[i].name) == 0)
|
||||
{
|
||||
procEntry = &spentry->procList[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (procEntry)
|
||||
procEntry->proc = proc;
|
||||
else
|
||||
{
|
||||
newname = (char *)xalloc(strlen(name)+1);
|
||||
if (!newname)
|
||||
return FALSE;
|
||||
procEntry = (ProcEntryPtr)
|
||||
xrealloc(spentry->procList,
|
||||
sizeof(ProcEntryRec) * (spentry->num+1));
|
||||
if (!procEntry)
|
||||
{
|
||||
xfree(newname);
|
||||
return FALSE;
|
||||
}
|
||||
spentry->procList = procEntry;
|
||||
procEntry += spentry->num;
|
||||
procEntry->name = newname;
|
||||
strcpy(newname, name);
|
||||
procEntry->proc = proc;
|
||||
spentry->num++;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef XSERVER_DTRACE
|
||||
void LoadExtensionNames(char **RequestNames) {
|
||||
int i;
|
||||
|
|
|
|||
13
dix/gc.c
13
dix/gc.c
|
|
@ -69,7 +69,7 @@ extern FontPtr defaultFont;
|
|||
|
||||
static Bool CreateDefaultTile(GCPtr pGC);
|
||||
|
||||
unsigned char DefaultDash[2] = {4, 4};
|
||||
static unsigned char DefaultDash[2] = {4, 4};
|
||||
|
||||
_X_EXPORT void
|
||||
ValidateGC(DrawablePtr pDraw, GC *pGC)
|
||||
|
|
@ -907,17 +907,6 @@ FreeGC(pointer value, XID gid)
|
|||
return(Success);
|
||||
}
|
||||
|
||||
void
|
||||
SetGCMask(GCPtr pGC, Mask selectMask, Mask newDataMask)
|
||||
{
|
||||
pGC->stateChanges = (~selectMask & pGC->stateChanges) |
|
||||
(selectMask & newDataMask);
|
||||
if (selectMask & newDataMask)
|
||||
pGC->serialNumber |= GC_CHANGE_SERIAL_BIT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* CreateScratchGC(pScreen, depth)
|
||||
like CreateGC, but doesn't do the default tile or stipple,
|
||||
since we can't create them without already having a GC. any code
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
#ifdef XKB
|
||||
#include <X11/extensions/XKBproto.h>
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#include <xkbsrv.h>
|
||||
extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ CreateNewResourceClass()
|
|||
return next;
|
||||
}
|
||||
|
||||
ClientResourceRec clientTable[MAXCLIENTS];
|
||||
static ClientResourceRec clientTable[MAXCLIENTS];
|
||||
|
||||
/*****************
|
||||
* InitClientResources
|
||||
|
|
|
|||
109
dix/swaprep.c
109
dix/swaprep.c
|
|
@ -317,7 +317,7 @@ SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
|||
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SwapTimecoord(xTimecoord* pCoord)
|
||||
{
|
||||
char n;
|
||||
|
|
@ -584,7 +584,7 @@ SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep
|
|||
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SwapRGB(xrgb *prgb)
|
||||
{
|
||||
char n;
|
||||
|
|
@ -1159,6 +1159,58 @@ SKeymapNotifyEvent(xEvent *from, xEvent *to)
|
|||
*to = *from;
|
||||
}
|
||||
|
||||
static void
|
||||
SwapConnSetup(xConnSetup *pConnSetup, xConnSetup *pConnSetupT)
|
||||
{
|
||||
cpswapl(pConnSetup->release, pConnSetupT->release);
|
||||
cpswapl(pConnSetup->ridBase, pConnSetupT->ridBase);
|
||||
cpswapl(pConnSetup->ridMask, pConnSetupT->ridMask);
|
||||
cpswapl(pConnSetup->motionBufferSize, pConnSetupT->motionBufferSize);
|
||||
cpswaps(pConnSetup->nbytesVendor, pConnSetupT->nbytesVendor);
|
||||
cpswaps(pConnSetup->maxRequestSize, pConnSetupT->maxRequestSize);
|
||||
pConnSetupT->minKeyCode = pConnSetup->minKeyCode;
|
||||
pConnSetupT->maxKeyCode = pConnSetup->maxKeyCode;
|
||||
pConnSetupT->numRoots = pConnSetup->numRoots;
|
||||
pConnSetupT->numFormats = pConnSetup->numFormats;
|
||||
pConnSetupT->imageByteOrder = pConnSetup->imageByteOrder;
|
||||
pConnSetupT->bitmapBitOrder = pConnSetup->bitmapBitOrder;
|
||||
pConnSetupT->bitmapScanlineUnit = pConnSetup->bitmapScanlineUnit;
|
||||
pConnSetupT->bitmapScanlinePad = pConnSetup->bitmapScanlinePad;
|
||||
}
|
||||
|
||||
static void
|
||||
SwapWinRoot(xWindowRoot *pRoot, xWindowRoot *pRootT)
|
||||
{
|
||||
cpswapl(pRoot->windowId, pRootT->windowId);
|
||||
cpswapl(pRoot->defaultColormap, pRootT->defaultColormap);
|
||||
cpswapl(pRoot->whitePixel, pRootT->whitePixel);
|
||||
cpswapl(pRoot->blackPixel, pRootT->blackPixel);
|
||||
cpswapl(pRoot->currentInputMask, pRootT->currentInputMask);
|
||||
cpswaps(pRoot->pixWidth, pRootT->pixWidth);
|
||||
cpswaps(pRoot->pixHeight, pRootT->pixHeight);
|
||||
cpswaps(pRoot->mmWidth, pRootT->mmWidth);
|
||||
cpswaps(pRoot->mmHeight, pRootT->mmHeight);
|
||||
cpswaps(pRoot->minInstalledMaps, pRootT->minInstalledMaps);
|
||||
cpswaps(pRoot->maxInstalledMaps, pRootT->maxInstalledMaps);
|
||||
cpswapl(pRoot->rootVisualID, pRootT->rootVisualID);
|
||||
pRootT->backingStore = pRoot->backingStore;
|
||||
pRootT->saveUnders = pRoot->saveUnders;
|
||||
pRootT->rootDepth = pRoot->rootDepth;
|
||||
pRootT->nDepths = pRoot->nDepths;
|
||||
}
|
||||
|
||||
static void
|
||||
SwapVisual(xVisualType *pVis, xVisualType *pVisT)
|
||||
{
|
||||
cpswapl(pVis->visualID, pVisT->visualID);
|
||||
pVisT->class = pVis->class;
|
||||
pVisT->bitsPerRGB = pVis->bitsPerRGB;
|
||||
cpswaps(pVis->colormapEntries, pVisT->colormapEntries);
|
||||
cpswapl(pVis->redMask, pVisT->redMask);
|
||||
cpswapl(pVis->greenMask, pVisT->greenMask);
|
||||
cpswapl(pVis->blueMask, pVisT->blueMask);
|
||||
}
|
||||
|
||||
_X_EXPORT void
|
||||
SwapConnSetupInfo(
|
||||
char *pInfo,
|
||||
|
|
@ -1210,7 +1262,6 @@ SwapConnSetupInfo(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
|
||||
{
|
||||
|
|
@ -1227,58 +1278,6 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
|
|||
DEALLOCATE_LOCAL(pInfoTBase);
|
||||
}
|
||||
|
||||
void
|
||||
SwapConnSetup(xConnSetup *pConnSetup, xConnSetup *pConnSetupT)
|
||||
{
|
||||
cpswapl(pConnSetup->release, pConnSetupT->release);
|
||||
cpswapl(pConnSetup->ridBase, pConnSetupT->ridBase);
|
||||
cpswapl(pConnSetup->ridMask, pConnSetupT->ridMask);
|
||||
cpswapl(pConnSetup->motionBufferSize, pConnSetupT->motionBufferSize);
|
||||
cpswaps(pConnSetup->nbytesVendor, pConnSetupT->nbytesVendor);
|
||||
cpswaps(pConnSetup->maxRequestSize, pConnSetupT->maxRequestSize);
|
||||
pConnSetupT->minKeyCode = pConnSetup->minKeyCode;
|
||||
pConnSetupT->maxKeyCode = pConnSetup->maxKeyCode;
|
||||
pConnSetupT->numRoots = pConnSetup->numRoots;
|
||||
pConnSetupT->numFormats = pConnSetup->numFormats;
|
||||
pConnSetupT->imageByteOrder = pConnSetup->imageByteOrder;
|
||||
pConnSetupT->bitmapBitOrder = pConnSetup->bitmapBitOrder;
|
||||
pConnSetupT->bitmapScanlineUnit = pConnSetup->bitmapScanlineUnit;
|
||||
pConnSetupT->bitmapScanlinePad = pConnSetup->bitmapScanlinePad;
|
||||
}
|
||||
|
||||
void
|
||||
SwapWinRoot(xWindowRoot *pRoot, xWindowRoot *pRootT)
|
||||
{
|
||||
cpswapl(pRoot->windowId, pRootT->windowId);
|
||||
cpswapl(pRoot->defaultColormap, pRootT->defaultColormap);
|
||||
cpswapl(pRoot->whitePixel, pRootT->whitePixel);
|
||||
cpswapl(pRoot->blackPixel, pRootT->blackPixel);
|
||||
cpswapl(pRoot->currentInputMask, pRootT->currentInputMask);
|
||||
cpswaps(pRoot->pixWidth, pRootT->pixWidth);
|
||||
cpswaps(pRoot->pixHeight, pRootT->pixHeight);
|
||||
cpswaps(pRoot->mmWidth, pRootT->mmWidth);
|
||||
cpswaps(pRoot->mmHeight, pRootT->mmHeight);
|
||||
cpswaps(pRoot->minInstalledMaps, pRootT->minInstalledMaps);
|
||||
cpswaps(pRoot->maxInstalledMaps, pRootT->maxInstalledMaps);
|
||||
cpswapl(pRoot->rootVisualID, pRootT->rootVisualID);
|
||||
pRootT->backingStore = pRoot->backingStore;
|
||||
pRootT->saveUnders = pRoot->saveUnders;
|
||||
pRootT->rootDepth = pRoot->rootDepth;
|
||||
pRootT->nDepths = pRoot->nDepths;
|
||||
}
|
||||
|
||||
void
|
||||
SwapVisual(xVisualType *pVis, xVisualType *pVisT)
|
||||
{
|
||||
cpswapl(pVis->visualID, pVisT->visualID);
|
||||
pVisT->class = pVis->class;
|
||||
pVisT->bitsPerRGB = pVis->bitsPerRGB;
|
||||
cpswaps(pVis->colormapEntries, pVisT->colormapEntries);
|
||||
cpswapl(pVis->redMask, pVisT->redMask);
|
||||
cpswapl(pVis->greenMask, pVisT->greenMask);
|
||||
cpswapl(pVis->blueMask, pVisT->blueMask);
|
||||
}
|
||||
|
||||
_X_EXPORT void
|
||||
SwapConnSetupPrefix(xConnSetupPrefix *pcspFrom, xConnSetupPrefix *pcspTo)
|
||||
{
|
||||
|
|
|
|||
175
dix/window.c
175
dix/window.c
|
|
@ -307,10 +307,6 @@ SetWindowToDefaults(WindowPtr pWin)
|
|||
pWin->deliverableEvents = 0;
|
||||
pWin->dontPropagate = 0;
|
||||
pWin->forcedBS = FALSE;
|
||||
#ifdef NEED_DBE_BUF_BITS
|
||||
pWin->srcBuffer = DBE_FRONT_BUFFER;
|
||||
pWin->dstBuffer = DBE_FRONT_BUFFER;
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
pWin->redirectDraw = 0;
|
||||
#endif
|
||||
|
|
@ -557,7 +553,7 @@ InitRootWindow(WindowPtr pWin)
|
|||
* window from which the region came.
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn,
|
||||
int x, int y,
|
||||
int w, int h)
|
||||
|
|
@ -853,6 +849,46 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
|||
return pWin;
|
||||
}
|
||||
|
||||
static void
|
||||
DisposeWindowOptional (WindowPtr pWin)
|
||||
{
|
||||
if (!pWin->optional)
|
||||
return;
|
||||
/*
|
||||
* everything is peachy. Delete the optional record
|
||||
* and clean up
|
||||
*/
|
||||
if (pWin->optional->cursor)
|
||||
{
|
||||
FreeCursor (pWin->optional->cursor, (Cursor)0);
|
||||
pWin->cursorIsNone = FALSE;
|
||||
}
|
||||
else
|
||||
pWin->cursorIsNone = TRUE;
|
||||
|
||||
if (pWin->optional->deviceCursors)
|
||||
{
|
||||
DevCursorList pList;
|
||||
DevCursorList pPrev;
|
||||
pList = pWin->optional->deviceCursors;
|
||||
while(pList)
|
||||
{
|
||||
if (pList->cursor)
|
||||
FreeCursor(pList->cursor, (XID)0);
|
||||
pPrev = pList;
|
||||
pList = pList->next;
|
||||
xfree(pPrev);
|
||||
}
|
||||
pWin->optional->deviceCursors = NULL;
|
||||
}
|
||||
|
||||
xfree(pWin->optional->access.perm);
|
||||
xfree(pWin->optional->access.deny);
|
||||
|
||||
xfree (pWin->optional);
|
||||
pWin->optional = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
FreeWindowResources(WindowPtr pWin)
|
||||
{
|
||||
|
|
@ -2721,6 +2757,30 @@ RealizeTree(WindowPtr pWin)
|
|||
}
|
||||
}
|
||||
|
||||
static WindowPtr windowDisableMapUnmapEvents;
|
||||
|
||||
void
|
||||
DisableMapUnmapEvents(WindowPtr pWin)
|
||||
{
|
||||
assert (windowDisableMapUnmapEvents == NULL);
|
||||
|
||||
windowDisableMapUnmapEvents = pWin;
|
||||
}
|
||||
|
||||
void
|
||||
EnableMapUnmapEvents(WindowPtr pWin)
|
||||
{
|
||||
assert (windowDisableMapUnmapEvents != NULL);
|
||||
|
||||
windowDisableMapUnmapEvents = NULL;
|
||||
}
|
||||
|
||||
static Bool
|
||||
MapUnmapEventsEnabled(WindowPtr pWin)
|
||||
{
|
||||
return pWin != windowDisableMapUnmapEvents;
|
||||
}
|
||||
|
||||
/*****
|
||||
* MapWindow
|
||||
* If some other client has selected SubStructureReDirect on the parent
|
||||
|
|
@ -3219,21 +3279,6 @@ HandleSaveSet(ClientPtr client)
|
|||
client->saveSet = (SaveSetElt *)NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* \param x,y in root
|
||||
* \param box "return" value
|
||||
*/
|
||||
Bool
|
||||
VisibleBoundingBoxFromPoint(WindowPtr pWin, int x, int y, BoxPtr box)
|
||||
{
|
||||
if (!pWin->realized)
|
||||
return (FALSE);
|
||||
if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->clipList, x, y, box))
|
||||
return(TRUE);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* \param x,y in root
|
||||
|
|
@ -3342,30 +3387,6 @@ SendVisibilityNotify(WindowPtr pWin)
|
|||
DeliverEvents(pWin, &event, 1, NullWindow);
|
||||
}
|
||||
|
||||
static WindowPtr windowDisableMapUnmapEvents;
|
||||
|
||||
void
|
||||
DisableMapUnmapEvents(WindowPtr pWin)
|
||||
{
|
||||
assert (windowDisableMapUnmapEvents == NULL);
|
||||
|
||||
windowDisableMapUnmapEvents = pWin;
|
||||
}
|
||||
|
||||
void
|
||||
EnableMapUnmapEvents(WindowPtr pWin)
|
||||
{
|
||||
assert (windowDisableMapUnmapEvents != NULL);
|
||||
|
||||
windowDisableMapUnmapEvents = NULL;
|
||||
}
|
||||
|
||||
Bool
|
||||
MapUnmapEventsEnabled(WindowPtr pWin)
|
||||
{
|
||||
return pWin != windowDisableMapUnmapEvents;
|
||||
}
|
||||
|
||||
#define RANDOM_WIDTH 32
|
||||
|
||||
#ifndef NOLOGOHACK
|
||||
|
|
@ -3738,61 +3759,6 @@ MakeWindowOptional (WindowPtr pWin)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
DisposeWindowOptional (WindowPtr pWin)
|
||||
{
|
||||
if (!pWin->optional)
|
||||
return;
|
||||
/*
|
||||
* everything is peachy. Delete the optional record
|
||||
* and clean up
|
||||
*/
|
||||
/*
|
||||
* TOG changed this code to:
|
||||
*
|
||||
* if (pWin->cursorIsNone == FALSE)
|
||||
* FreeCursor (pWin->optional->cursor, (Cursor)0);
|
||||
* pWin->cursorIsNone = TRUE;
|
||||
*
|
||||
* This is blatently wrong; windows without optionals can have
|
||||
* two different cursor values, either None or sharing their
|
||||
* parents cursor. This difference is controlled by the
|
||||
* cursorIsNone value; when TRUE, the window has no cursor,
|
||||
* when false, it shares its cursor with its parent; TOG
|
||||
* made it impossible for a window to have a cursor without
|
||||
* an optional record.
|
||||
*/
|
||||
if (pWin->optional->cursor)
|
||||
{
|
||||
FreeCursor (pWin->optional->cursor, (Cursor)0);
|
||||
pWin->cursorIsNone = FALSE;
|
||||
}
|
||||
else
|
||||
pWin->cursorIsNone = TRUE;
|
||||
|
||||
if (pWin->optional->deviceCursors)
|
||||
{
|
||||
DevCursorList pList;
|
||||
DevCursorList pPrev;
|
||||
pList = pWin->optional->deviceCursors;
|
||||
while(pList)
|
||||
{
|
||||
if (pList->cursor)
|
||||
FreeCursor(pList->cursor, (XID)0);
|
||||
pPrev = pList;
|
||||
pList = pList->next;
|
||||
xfree(pPrev);
|
||||
}
|
||||
pWin->optional->deviceCursors = NULL;
|
||||
}
|
||||
|
||||
xfree(pWin->optional->access.perm);
|
||||
xfree(pWin->optional->access.deny);
|
||||
|
||||
xfree (pWin->optional);
|
||||
pWin->optional = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Changes the cursor struct for the given device and the given window.
|
||||
* A cursor that does not have a device cursor set will use whatever the
|
||||
|
|
@ -3807,9 +3773,10 @@ DisposeWindowOptional (WindowPtr pWin)
|
|||
* Assumption: If there is a node for a device in the list, the device has a
|
||||
* cursor. If the cursor is set to None, it is inherited by the parent.
|
||||
*/
|
||||
int ChangeWindowDeviceCursor(register WindowPtr pWin,
|
||||
DeviceIntPtr pDev,
|
||||
CursorPtr pCursor)
|
||||
_X_EXPORT int
|
||||
ChangeWindowDeviceCursor(WindowPtr pWin,
|
||||
DeviceIntPtr pDev,
|
||||
CursorPtr pCursor)
|
||||
{
|
||||
DevCursNodePtr pNode, pPrev;
|
||||
CursorPtr pOldCursor = NULL;
|
||||
|
|
@ -3905,7 +3872,8 @@ int ChangeWindowDeviceCursor(register WindowPtr pWin,
|
|||
}
|
||||
|
||||
/* Get device cursor for given device or None if none is set */
|
||||
CursorPtr WindowGetDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev)
|
||||
_X_EXPORT CursorPtr
|
||||
WindowGetDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev)
|
||||
{
|
||||
DevCursorList pList;
|
||||
|
||||
|
|
@ -4001,7 +3969,6 @@ WindowParentHasDeviceCursor(WindowPtr pWin,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NOLOGOHACK
|
||||
static void
|
||||
DrawLogo(WindowPtr pWin)
|
||||
|
|
|
|||
Loading…
Reference in a new issue