diff options
author | marha <marha@users.sourceforge.net> | 2010-05-20 07:07:37 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-05-20 07:07:37 +0000 |
commit | 3319741e6f9fc3232eb40462a261271b9af2dcb2 (patch) | |
tree | ffe7fbae59390aafa850dcdbd3ea48d2cb59bda0 /xorg-server/dix/events.c | |
parent | 153f5cafa19da4e4c0cf21e9c909958359ed8ebd (diff) | |
download | vcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.tar.gz vcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.tar.bz2 vcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.zip |
xserver git update 20/5/2010
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r-- | xorg-server/dix/events.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index a537730a9..d68eeee62 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -1841,7 +1841,6 @@ int TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
int count, Mask mask, Mask filter, GrabPtr grab)
{
- int i;
int type;
#ifdef DEBUG_EVENTS
@@ -1908,7 +1907,6 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, {
xEvent release = *pEvents;
release.u.u.type = KeyRelease;
- release.u.u.sequenceNumber = client->sequence;
WriteEventsToClient(client, 1, &release);
#ifdef DEBUG_EVENTS
ErrorF(" (plus fake core release for repeat)");
@@ -1929,7 +1927,6 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, {
deviceKeyButtonPointer release = *(deviceKeyButtonPointer *)pEvents;
release.type = DeviceKeyRelease;
- release.sequenceNumber = client->sequence;
#ifdef DEBUG_EVENTS
ErrorF(" (plus fake xi1 release for repeat)");
#endif
@@ -1943,14 +1940,6 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, }
}
- type &= 0177;
- if (type != KeymapNotify)
- {
- /* all extension events must have a sequence number */
- for (i = 0; i < count; i++)
- pEvents[i].u.u.sequenceNumber = client->sequence;
- }
-
if (BitIsOn(criticalEvents, type))
{
if (client->smart_priority < SMART_MAX_PRIORITY)
@@ -4708,7 +4697,7 @@ ProcChangeActivePointerGrab(ClientPtr client) if (rc != Success)
{
client->errorValue = stuff->cursor;
- return (rc == BadValue) ? BadCursor : rc;
+ return rc;
}
}
@@ -4831,7 +4820,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, if (rc != Success)
{
client->errorValue = curs;
- return (rc == BadValue) ? BadCursor : rc;
+ return rc;
}
access_mode |= DixForceAccess;
}
@@ -5356,7 +5345,7 @@ ProcGrabButton(ClientPtr client) if (rc != Success)
{
client->errorValue = stuff->cursor;
- return (rc == BadValue) ? BadCursor : rc;
+ return rc;
}
access_mode |= DixForceAccess;
}
@@ -5619,7 +5608,7 @@ ProcRecolorCursor(ClientPtr client) if (rc != Success)
{
client->errorValue = stuff->cursor;
- return (rc == BadValue) ? BadCursor : rc;
+ return rc;
}
pCursor->foreRed = stuff->foreRed;
@@ -5669,6 +5658,13 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) int i,
eventlength = sizeof(xEvent);
+ if (!pClient || pClient == serverClient || pClient->clientGone)
+ return;
+
+ for (i = 0; i < count; i++)
+ if ((events[i].u.u.type & 0x7f) != KeymapNotify)
+ events[i].u.u.sequenceNumber = pClient->sequence;
+
/* Let XKB rewrite the state, as it depends on client preferences. */
XkbFilterEvents(pClient, count, events);
|