summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Kreitman <stuart.kreitman@sun.com>2004-03-26 01:22:18 +0000
committerStuart Kreitman <stuart.kreitman@sun.com>2004-03-26 01:22:18 +0000
commit861a33678243349b987ff30912985968ede8ac84 (patch)
tree20d65e9ce57798a6474a2b28f576db9140d1ff71
parentd1e52f13ad4610ec4907432c21384d08d6aaaf27 (diff)
oops
-rw-r--r--dix/dispatch.c2
-rw-r--r--dix/dixutils.c58
-rw-r--r--dix/events.c5
-rw-r--r--dix/window.c17
4 files changed, 26 insertions, 56 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index afbb1b926..0916f4c3d 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -627,7 +627,7 @@ ProcChangeSaveSet(client)
return BadMatch;
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)
return(client->noClientException);
else
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 7c2fe09e3..40f80d348 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -152,21 +152,6 @@ ClientTimeToServerTime(c)
* 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
CopyISOLatin1Lowered(dest, source, length)
register unsigned char *dest, *source;
@@ -175,27 +160,17 @@ CopyISOLatin1Lowered(dest, source, length)
register int i;
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 */
- c1 = s1len-- ? *s1++ : '\0';
- c2 = s2len-- ? *s2++ : '\0';
- if (!c1 ||
- (c1 != c2 &&
- (c1 = ISOLatin1ToLower (c1)) != (c2 = ISOLatin1ToLower (c2))))
- break;
+ 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 (int) c1 - (int) c2;
+ *dest = '\0';
}
#ifdef XCSECURITY
@@ -346,11 +321,10 @@ LookupClient(rid, client)
int
-AlterSaveSetForClient(ClientPtr client,
- WindowPtr pWin,
- unsigned mode,
- Bool toRoot,
- Bool remap)
+AlterSaveSetForClient(client, pWin, mode)
+ ClientPtr client;
+ WindowPtr pWin;
+ unsigned mode;
{
int numnow;
pointer *pTmp = NULL;
@@ -374,9 +348,7 @@ AlterSaveSetForClient(ClientPtr client,
return(BadAlloc);
client->saveSet = pTmp;
client->numSaved = numnow;
- SaveSetAssignWindow(client->saveSet[numnow - 1], pWin);
- SaveSetAssignToRoot(client->saveSet[numnow - 1], toRoot);
- SaveSetAssignRemap(client->saveSet[numnow - 1], remap);
+ client->saveSet[numnow - 1] = (pointer)pWin;
return(Success);
}
else if ((mode == SetModeDelete) && (j < numnow))
@@ -416,7 +388,7 @@ DeleteWindowFromAnySaveSet(pWin)
{
client = clients[i];
if (client && client->numSaved)
- (void)AlterSaveSetForClient(client, pWin, SetModeDelete, FALSE, TRUE);
+ (void)AlterSaveSetForClient(client, pWin, SetModeDelete);
}
}
diff --git a/dix/events.c b/dix/events.c
index baff86954..b659f0155 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -181,6 +181,11 @@ static WindowPtr *spriteTrace = (WindowPtr *)NULL;
static int spriteTraceSize = 0;
static int spriteTraceGood;
+typedef struct {
+ int x, y;
+ ScreenPtr pScreen;
+} HotSpot;
+
static struct {
CursorPtr current;
BoxRec hotLimits; /* logical constraints of hot spot */
diff --git a/dix/window.c b/dix/window.c
index 7aea71e84..b410bd948 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -3152,17 +3152,10 @@ HandleSaveSet(client)
for (j=0; j<client->numSaved; j++)
{
- pWin = SaveSetWindow(client->saveSet[j]);
-#ifdef XFIXES
- if (SaveSetToRoot(client->saveSet[j]))
- pParent = WindowTable[pWin->drawable.pScreen->myNum];
- else
-#endif
- {
- pParent = pWin->parent;
- while (pParent && (wClient (pParent) == client))
- pParent = pParent->parent;
- }
+ pWin = (WindowPtr)client->saveSet[j];
+ pParent = pWin->parent;
+ while (pParent && (wClient (pParent) == client))
+ pParent = pParent->parent;
if (pParent)
{
if (pParent != pWin->parent)
@@ -3179,7 +3172,7 @@ HandleSaveSet(client)
}
xfree(client->saveSet);
client->numSaved = 0;
- client->saveSet = (SaveSetElt *)NULL;
+ client->saveSet = (pointer *)NULL;
}
Bool