diff options
author | Jamey Sharp <jamey@minilop.net> | 2016-07-03 22:52:13 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-05 08:38:36 +0200 |
commit | cb0089bad114e79d5c6e4577da59fa8911d0ee8d (patch) | |
tree | 31d29fe44149a431af70d22afb8e3b73db31d8a0 /nx-X11/programs/Xserver/Xext | |
parent | 9ea88717db376b54b2c821ab67e846918acc616a (diff) | |
download | nx-libs-cb0089bad114e79d5c6e4577da59fa8911d0ee8d.tar.gz nx-libs-cb0089bad114e79d5c6e4577da59fa8911d0ee8d.tar.bz2 nx-libs-cb0089bad114e79d5c6e4577da59fa8911d0ee8d.zip |
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>
Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/Xext')
-rw-r--r-- | nx-X11/programs/Xserver/Xext/saver.c | 5 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/security.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/shape.c | 5 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/shm.c | 1 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/sync.c | 5 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xvdisp.c | 1 |
6 files changed, 3 insertions, 18 deletions
diff --git a/nx-X11/programs/Xserver/Xext/saver.c b/nx-X11/programs/Xserver/Xext/saver.c index 0c5d28eb2..ab1096351 100644 --- a/nx-X11/programs/Xserver/Xext/saver.c +++ b/nx-X11/programs/Xserver/Xext/saver.c @@ -447,7 +447,6 @@ SendScreenSaverNotify (pScreen, state, forced) ScreenSaverEventPtr pEv; unsigned long mask; xScreenSaverNotifyEvent ev; - ClientPtr client; int kind; UpdateCurrentTimeIf (); @@ -466,18 +465,16 @@ SendScreenSaverNotify (pScreen, state, 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 = pScreen->root->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/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c index 4f055ffe0..c7cd3f1fd 100644 --- a/nx-X11/programs/Xserver/Xext/security.c +++ b/nx-X11/programs/Xserver/Xext/security.c @@ -309,12 +309,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/nx-X11/programs/Xserver/Xext/shape.c b/nx-X11/programs/Xserver/Xext/shape.c index 80ef71f67..a4aa5bece 100644 --- a/nx-X11/programs/Xserver/Xext/shape.c +++ b/nx-X11/programs/Xserver/Xext/shape.c @@ -915,7 +915,6 @@ SendShapeNotify (pWin, which) int which; { ShapeEventPtr *pHead, pShapeEvent; - ClientPtr client; xShapeNotifyEvent se; BoxRec extents; RegionPtr region; @@ -968,18 +967,16 @@ SendShapeNotify (pWin, 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/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index b6e61de36..2f82ebcf6 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -928,7 +928,6 @@ ProcShmPutImage(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/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c index 3eb45a246..a137afedd 100644 --- a/nx-X11/programs/Xserver/Xext/sync.c +++ b/nx-X11/programs/Xserver/Xext/sync.c @@ -545,7 +545,6 @@ SyncSendAlarmNotifyEvents(pAlarm) ane.type = SyncEventBase + XSyncAlarmNotify; ane.kind = XSyncAlarmNotify; - ane.sequenceNumber = pAlarm->client->sequence; ane.alarm = pAlarm->alarm_id; if (pTrigger->pCounter) { @@ -568,10 +567,7 @@ SyncSendAlarmNotifyEvents(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); - } } @@ -599,7 +595,6 @@ SyncSendCounterNotifyEvents(client, ppAwait, num_events) 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/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c index 905539c0b..923202701 100644 --- a/nx-X11/programs/Xserver/Xext/xvdisp.c +++ b/nx-X11/programs/Xserver/Xext/xvdisp.c @@ -1205,7 +1205,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; |