summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-15 13:12:44 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-19 12:32:34 -0700
commit8033fb6c9792820a82fbdff6a14ff8a7a141ba74 (patch)
tree8e9d073e08028f46e5b8c725a029bc8f41c216fc /Xext
parent4b9600a4167427a8fe88bca9b738c9a99cac9469 (diff)
Set event sequence number in WriteEventsToClient instead of at callers.
TryClientEvents already did this; this commit just moves the assignment one level down so that no event source has to worry about sequence numbers. ...No event source, that is, except XKB, which inexplicably calls WriteToClient directly for several events. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'Xext')
-rw-r--r--Xext/saver.c5
-rw-r--r--Xext/security.c4
-rw-r--r--Xext/shape.c5
-rw-r--r--Xext/shm.c1
-rw-r--r--Xext/sync.c5
-rw-r--r--Xext/xcalibrate.c1
-rw-r--r--Xext/xvdisp.c1
7 files changed, 3 insertions, 19 deletions
diff --git a/Xext/saver.c b/Xext/saver.c
index 42fc6328b..30c4a8c9b 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -480,7 +480,6 @@ SendScreenSaverNotify (ScreenPtr pScreen, int state, Bool forced)
ScreenSaverEventPtr pEv;
unsigned long mask;
xScreenSaverNotifyEvent ev;
- ClientPtr client;
int kind;
UpdateCurrentTimeIf ();
@@ -499,18 +498,16 @@ SendScreenSaverNotify (ScreenPtr pScreen, int state, Bool forced)
kind = ScreenSaverInternal;
for (pEv = pPriv->events; pEv; pEv = pEv->next)
{
- client = pEv->client;
if (!(pEv->mask & mask))
continue;
ev.type = ScreenSaverNotify + ScreenSaverEventBase;
ev.state = state;
- ev.sequenceNumber = client->sequence;
ev.timestamp = currentTime.milliseconds;
ev.root = WindowTable[pScreen->myNum]->drawable.id;
ev.window = savedScreenInfo[pScreen->myNum].wid;
ev.kind = kind;
ev.forced = forced;
- WriteEventsToClient (client, 1, (xEvent *) &ev);
+ WriteEventsToClient (pEv->client, 1, (xEvent *) &ev);
}
}
diff --git a/Xext/security.c b/Xext/security.c
index 16aac05e4..32730e20d 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -198,12 +198,10 @@ SecurityDeleteAuthorization(
while ((pEventClient = pAuth->eventClients))
{
/* send revocation event event */
- ClientPtr client = rClient(pEventClient);
xSecurityAuthorizationRevokedEvent are;
are.type = SecurityEventBase + XSecurityAuthorizationRevoked;
- are.sequenceNumber = client->sequence;
are.authId = pAuth->id;
- WriteEventsToClient(client, 1, (xEvent *)&are);
+ WriteEventsToClient(rClient(pEventClient), 1, (xEvent *)&are);
FreeResource(pEventClient->resource, RT_NONE);
}
diff --git a/Xext/shape.c b/Xext/shape.c
index 10437f496..10ac2839c 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -885,7 +885,6 @@ void
SendShapeNotify (WindowPtr pWin, int which)
{
ShapeEventPtr *pHead, pShapeEvent;
- ClientPtr client;
xShapeNotifyEvent se;
BoxRec extents;
RegionPtr region;
@@ -940,18 +939,16 @@ SendShapeNotify (WindowPtr pWin, int which)
return;
}
for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) {
- client = pShapeEvent->client;
se.type = ShapeNotify + ShapeEventBase;
se.kind = which;
se.window = pWin->drawable.id;
- se.sequenceNumber = client->sequence;
se.x = extents.x1;
se.y = extents.y1;
se.width = extents.x2 - extents.x1;
se.height = extents.y2 - extents.y1;
se.time = currentTime.milliseconds;
se.shaped = shaped;
- WriteEventsToClient (client, 1, (xEvent *) &se);
+ WriteEventsToClient (pShapeEvent->client, 1, (xEvent *) &se);
}
}
diff --git a/Xext/shm.c b/Xext/shm.c
index 25043fadc..b2c42083e 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -943,7 +943,6 @@ ProcShmPutImage(ClientPtr client)
ev.type = ShmCompletionCode;
ev.drawable = stuff->drawable;
- ev.sequenceNumber = client->sequence;
ev.minorEvent = X_ShmPutImage;
ev.majorEvent = ShmReqCode;
ev.shmseg = stuff->shmseg;
diff --git a/Xext/sync.c b/Xext/sync.c
index 3729f1bf2..f7ac405dd 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -372,7 +372,6 @@ SyncSendAlarmNotifyEvents(SyncAlarm *pAlarm)
ane.type = SyncEventBase + XSyncAlarmNotify;
ane.kind = XSyncAlarmNotify;
- ane.sequenceNumber = pAlarm->client->sequence;
ane.alarm = pAlarm->alarm_id;
if (pTrigger->pCounter)
{
@@ -395,10 +394,7 @@ SyncSendAlarmNotifyEvents(SyncAlarm *pAlarm)
/* send to other interested clients */
for (pcl = pAlarm->pEventClients; pcl; pcl = pcl->next)
- {
- ane.sequenceNumber = pcl->client->sequence;
WriteEventsToClient(pcl->client, 1, (xEvent *) &ane);
- }
}
@@ -423,7 +419,6 @@ SyncSendCounterNotifyEvents(ClientPtr client, SyncAwait **ppAwait,
SyncTrigger *pTrigger = &(*ppAwait)->trigger;
pev->type = SyncEventBase + XSyncCounterNotify;
pev->kind = XSyncCounterNotify;
- pev->sequenceNumber = client->sequence;
pev->counter = pTrigger->pCounter->id;
pev->wait_value_lo = XSyncValueLow32(pTrigger->test_value);
pev->wait_value_hi = XSyncValueHigh32(pTrigger->test_value);
diff --git a/Xext/xcalibrate.c b/Xext/xcalibrate.c
index 865938497..bff1c3168 100644
--- a/Xext/xcalibrate.c
+++ b/Xext/xcalibrate.c
@@ -54,7 +54,6 @@ xcalibrate_event_hook (int x, int y, int pressure, void *closure)
xXCalibrateRawTouchscreenEvent ev;
ev.type = XCalibrateEventBase + X_XCalibrateRawTouchscreen;
- ev.sequenceNumber = pClient->sequence;
ev.x = x;
ev.y = y;
ev.pressure = pressure;
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index fd633f1f9..250a9949a 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -1100,7 +1100,6 @@ ProcXvShmPutImage(ClientPtr client)
ev.type = ShmCompletionCode;
ev.drawable = stuff->drawable;
- ev.sequenceNumber = client->sequence;
ev.minorEvent = xv_ShmPutImage;
ev.majorEvent = XvReqCode;
ev.shmseg = stuff->shmseg;