aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/colormap.c8
-rw-r--r--xorg-server/dix/cursor.c3
-rw-r--r--xorg-server/dix/devices.c10
-rw-r--r--xorg-server/dix/dix.c0
-rw-r--r--xorg-server/dix/events.c8
5 files changed, 13 insertions, 16 deletions
diff --git a/xorg-server/dix/colormap.c b/xorg-server/dix/colormap.c
index fd2843213..cd2101e4a 100644
--- a/xorg-server/dix/colormap.c
+++ b/xorg-server/dix/colormap.c
@@ -2709,11 +2709,11 @@ static void _colormap_find_resource(pointer value, XID id,
ColormapPtr cmap = value;
int j;
+ if (pScreen != cmap->pScreen)
+ return;
+
j = cmap->pVisual - pScreen->visuals;
- /* Only remap if j is between 0 and the number of available visuals, otherwise the cmap
- does not correspond to the correct visual. */
- if (j>=0 && j<pScreen->numVisuals)
- cmap->pVisual = &visuals[j];
+ cmap->pVisual = &visuals[j];
}
/* something has realloced the visuals, instead of breaking
diff --git a/xorg-server/dix/cursor.c b/xorg-server/dix/cursor.c
index 086d008e0..6103b15e3 100644
--- a/xorg-server/dix/cursor.c
+++ b/xorg-server/dix/cursor.c
@@ -86,6 +86,8 @@ FreeCursorBits(CursorBitsPtr bits)
#ifdef ARGB_CURSOR
xfree(bits->argb);
#endif
+ dixFreePrivates(bits->devPrivates);
+ bits->devPrivates = NULL;
if (bits->refcnt == 0)
{
GlyphSharePtr *prev, this;
@@ -100,7 +102,6 @@ FreeCursorBits(CursorBitsPtr bits)
CloseFont(this->font, (Font)0);
xfree(this);
}
- dixFreePrivates(bits->devPrivates);
xfree(bits);
}
}
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 6a7907399..395e19acf 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -539,7 +539,7 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what)
int
CorePointerProc(DeviceIntPtr pDev, int what)
{
-#define NBUTTONS 7
+#define NBUTTONS 10
#define NAXES 2
BYTE map[NBUTTONS + 1];
int i = 0;
@@ -1520,14 +1520,12 @@ int
ProcGetModifierMapping(ClientPtr client)
{
xGetModifierMappingReply rep;
- int ret, max_keys_per_mod = 0;
+ int max_keys_per_mod = 0;
KeyCode *modkeymap = NULL;
REQUEST_SIZE_MATCH(xReq);
- ret = generate_modkeymap(client, PickKeyboard(client), &modkeymap,
- &max_keys_per_mod);
- if (ret != Success)
- return ret;
+ generate_modkeymap(client, PickKeyboard(client), &modkeymap,
+ &max_keys_per_mod);
memset(&rep, 0, sizeof(xGetModifierMappingReply));
rep.type = X_Reply;
diff --git a/xorg-server/dix/dix.c b/xorg-server/dix/dix.c
deleted file mode 100644
index e69de29bb..000000000
--- a/xorg-server/dix/dix.c
+++ /dev/null
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 8f26bd618..7c6beacd2 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1676,7 +1676,7 @@ AllowSome(ClientPtr client,
thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client);
thisSynced = FALSE;
otherGrabbed = FALSE;
- othersFrozen = TRUE;
+ othersFrozen = FALSE;
grabTime = grabinfo->grabTime;
for (dev = inputInfo.devices; dev; dev = dev->next)
{
@@ -1692,11 +1692,9 @@ AllowSome(ClientPtr client,
otherGrabbed = TRUE;
if (grabinfo->sync.other == devgrabinfo->grab)
thisSynced = TRUE;
- if (devgrabinfo->sync.state < FROZEN)
- othersFrozen = FALSE;
+ if (devgrabinfo->sync.state >= FROZEN)
+ othersFrozen = TRUE;
}
- else if (!devgrabinfo->sync.other || !SameClient(devgrabinfo->sync.other, client))
- othersFrozen = FALSE;
}
if (!((thisGrabbed && grabinfo->sync.state >= FROZEN) || thisSynced))
return;