This commit is contained in:
Stuart Kreitman 2004-03-26 01:22:18 +00:00
parent d1e52f13ad
commit 861a336782
4 changed files with 26 additions and 56 deletions

View File

@ -627,7 +627,7 @@ ProcChangeSaveSet(client)
return BadMatch; return BadMatch;
if ((stuff->mode == SetModeInsert) || (stuff->mode == SetModeDelete)) if ((stuff->mode == SetModeInsert) || (stuff->mode == SetModeDelete))
{ {
result = AlterSaveSetForClient(client, pWin, stuff->mode, FALSE, TRUE); result = AlterSaveSetForClient(client, pWin, stuff->mode);
if (client->noClientException != Success) if (client->noClientException != Success)
return(client->noClientException); return(client->noClientException);
else else

View File

@ -152,21 +152,6 @@ ClientTimeToServerTime(c)
* beware of too-small buffers * beware of too-small buffers
*/ */
static unsigned char
ISOLatin1ToLower (unsigned char source)
{
unsigned char dest;
if ((source >= XK_A) && (source <= XK_Z))
dest = source + (XK_a - XK_A);
else if ((source >= XK_Agrave) && (source <= XK_Odiaeresis))
dest = source + (XK_agrave - XK_Agrave);
else if ((source >= XK_Ooblique) && (source <= XK_Thorn))
dest = source + (XK_oslash - XK_Ooblique);
else
dest = source;
return dest;
}
void void
CopyISOLatin1Lowered(dest, source, length) CopyISOLatin1Lowered(dest, source, length)
register unsigned char *dest, *source; register unsigned char *dest, *source;
@ -175,27 +160,17 @@ CopyISOLatin1Lowered(dest, source, length)
register int i; register int i;
for (i = 0; i < length; i++, source++, dest++) for (i = 0; i < length; i++, source++, dest++)
*dest = ISOLatin1ToLower (*source);
*dest = '\0';
}
int
CompareISOLatin1Lowered(unsigned char *s1, int s1len,
unsigned char *s2, int s2len)
{
unsigned char c1, c2;
for (;;)
{ {
/* note -- compare against zero so that -1 ignores len */ if ((*source >= XK_A) && (*source <= XK_Z))
c1 = s1len-- ? *s1++ : '\0'; *dest = *source + (XK_a - XK_A);
c2 = s2len-- ? *s2++ : '\0'; else if ((*source >= XK_Agrave) && (*source <= XK_Odiaeresis))
if (!c1 || *dest = *source + (XK_agrave - XK_Agrave);
(c1 != c2 && else if ((*source >= XK_Ooblique) && (*source <= XK_Thorn))
(c1 = ISOLatin1ToLower (c1)) != (c2 = ISOLatin1ToLower (c2)))) *dest = *source + (XK_oslash - XK_Ooblique);
break; else
*dest = *source;
} }
return (int) c1 - (int) c2; *dest = '\0';
} }
#ifdef XCSECURITY #ifdef XCSECURITY
@ -346,11 +321,10 @@ LookupClient(rid, client)
int int
AlterSaveSetForClient(ClientPtr client, AlterSaveSetForClient(client, pWin, mode)
WindowPtr pWin, ClientPtr client;
unsigned mode, WindowPtr pWin;
Bool toRoot, unsigned mode;
Bool remap)
{ {
int numnow; int numnow;
pointer *pTmp = NULL; pointer *pTmp = NULL;
@ -374,9 +348,7 @@ AlterSaveSetForClient(ClientPtr client,
return(BadAlloc); return(BadAlloc);
client->saveSet = pTmp; client->saveSet = pTmp;
client->numSaved = numnow; client->numSaved = numnow;
SaveSetAssignWindow(client->saveSet[numnow - 1], pWin); client->saveSet[numnow - 1] = (pointer)pWin;
SaveSetAssignToRoot(client->saveSet[numnow - 1], toRoot);
SaveSetAssignRemap(client->saveSet[numnow - 1], remap);
return(Success); return(Success);
} }
else if ((mode == SetModeDelete) && (j < numnow)) else if ((mode == SetModeDelete) && (j < numnow))
@ -416,7 +388,7 @@ DeleteWindowFromAnySaveSet(pWin)
{ {
client = clients[i]; client = clients[i];
if (client && client->numSaved) if (client && client->numSaved)
(void)AlterSaveSetForClient(client, pWin, SetModeDelete, FALSE, TRUE); (void)AlterSaveSetForClient(client, pWin, SetModeDelete);
} }
} }

View File

@ -181,6 +181,11 @@ static WindowPtr *spriteTrace = (WindowPtr *)NULL;
static int spriteTraceSize = 0; static int spriteTraceSize = 0;
static int spriteTraceGood; static int spriteTraceGood;
typedef struct {
int x, y;
ScreenPtr pScreen;
} HotSpot;
static struct { static struct {
CursorPtr current; CursorPtr current;
BoxRec hotLimits; /* logical constraints of hot spot */ BoxRec hotLimits; /* logical constraints of hot spot */

View File

@ -3152,17 +3152,10 @@ HandleSaveSet(client)
for (j=0; j<client->numSaved; j++) for (j=0; j<client->numSaved; j++)
{ {
pWin = SaveSetWindow(client->saveSet[j]); pWin = (WindowPtr)client->saveSet[j];
#ifdef XFIXES pParent = pWin->parent;
if (SaveSetToRoot(client->saveSet[j])) while (pParent && (wClient (pParent) == client))
pParent = WindowTable[pWin->drawable.pScreen->myNum]; pParent = pParent->parent;
else
#endif
{
pParent = pWin->parent;
while (pParent && (wClient (pParent) == client))
pParent = pParent->parent;
}
if (pParent) if (pParent)
{ {
if (pParent != pWin->parent) if (pParent != pWin->parent)
@ -3179,7 +3172,7 @@ HandleSaveSet(client)
} }
xfree(client->saveSet); xfree(client->saveSet);
client->numSaved = 0; client->numSaved = 0;
client->saveSet = (SaveSetElt *)NULL; client->saveSet = (pointer *)NULL;
} }
Bool Bool