summaryrefslogtreecommitdiff
path: root/hw/xfree86
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 /hw/xfree86
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 'hw/xfree86')
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c5
-rw-r--r--hw/xfree86/dri2/dri2ext.c2
2 files changed, 1 insertions, 6 deletions
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 0b7f75e88..754fe372c 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -331,7 +331,6 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
XF86VidModeEventPtr pEv;
unsigned long mask;
xXF86VidModeNotifyEvent ev;
- ClientPtr client;
int kind;
UpdateCurrentTimeIf ();
@@ -343,17 +342,15 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
kind = XF86VidModeModeChange;
for (pEv = pPriv->events; pEv; pEv = pEv->next)
{
- client = pEv->client;
if (!(pEv->mask & mask))
continue;
ev.type = XF86VidModeNotify + XF86VidModeEventBase;
ev.state = state;
- ev.sequenceNumber = client->sequence;
ev.timestamp = currentTime.milliseconds;
ev.root = WindowTable[pScreen->myNum]->drawable.id;
ev.kind = kind;
ev.forced = forced;
- WriteEventsToClient (client, 1, (xEvent *) &ev);
+ WriteEventsToClient (pEv->client, 1, (xEvent *) &ev);
}
}
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 444751d51..e6d98f53b 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -161,7 +161,6 @@ DRI2InvalidateBuffersEvent(DrawablePtr pDraw, void *priv)
ClientPtr client = priv;
event.type = DRI2EventBase + DRI2_InvalidateBuffers;
- event.sequenceNumber = client->sequence;
event.drawable = pDraw->id;
WriteEventsToClient(client, 1, (xEvent *)&event);
@@ -363,7 +362,6 @@ DRI2SwapEvent(ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc,
DrawablePtr pDrawable = data;
event.type = DRI2EventBase + DRI2_BufferSwapComplete;
- event.sequenceNumber = client->sequence;
event.event_type = type;
event.drawable = pDrawable->id;
event.ust_hi = (CARD64)ust >> 32;