Backport 8033fb6c9792820a82f

This commit is contained in:
Lauri Kasanen 2015-02-27 18:20:10 +02:00
parent f2935fa50e
commit 2d5ee280e6
11 changed files with 5 additions and 41 deletions

View File

@ -499,15 +499,9 @@ int state;
Bool forced;
{
ScreenSaverScreenPrivatePtr pPriv;
ScreenSaverEventPtr pEv;
unsigned long mask;
xScreenSaverNotifyEvent ev;
ClientPtr client;
int kind;
UpdateCurrentTimeIf();
@ -525,20 +519,16 @@ Bool forced;
else
kind = ScreenSaverInternal;
for (pEv = pPriv->events; pEv; pEv = pEv->next) {
client = pEv->client;
if (client->clientGone)
continue;
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);
}
}

View File

@ -838,15 +838,9 @@ WindowPtr pWin;
int which;
{
ShapeEventPtr *pHead, pShapeEvent;
ClientPtr client;
xShapeNotifyEvent se;
BoxRec extents;
RegionPtr region;
BYTE shaped;
pHead = (ShapeEventPtr *) LookupIDByType(pWin->drawable.id, EventType);
@ -899,20 +893,16 @@ int which;
return;
}
for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) {
client = pShapeEvent->client;
if (client == serverClient || client->clientGone)
continue;
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);
}
}

View File

@ -638,7 +638,6 @@ ClientPtr client;
ev.type = ShmCompletionCode;
ev.drawable = stuff->drawable;
ev.sequenceNumber = client->sequence;
ev.minorEvent = X_ShmPutImage;
ev.majorEvent = ShmReqCode;
ev.shmseg = stuff->shmseg;

View File

@ -547,7 +547,6 @@ SyncAlarm *pAlarm;
ane.type = SyncEventBase + XSyncAlarmNotify;
ane.kind = XSyncAlarmNotify;
ane.sequenceNumber = pAlarm->client->sequence;
ane.alarm = pAlarm->alarm_id;
if (pTrigger->pCounter) {
ane.counter_value_hi = XSyncValueHigh32(pTrigger->pCounter->value);
@ -569,7 +568,6 @@ SyncAlarm *pAlarm;
/* send to other interested clients */
for (pcl = pAlarm->pEventClients; pcl; pcl = pcl->next) {
if (!pAlarm->client->clientGone) {
ane.sequenceNumber = pcl->client->sequence;
WriteEventsToClient(pcl->client, 1, (xEvent *) &ane);
}
}
@ -602,7 +600,6 @@ int num_events;
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);

View File

@ -3809,7 +3809,6 @@ SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode,
xError rep;
rep.type = X_Error;
rep.sequenceNumber = client->sequence;
rep.errorCode = errorCode;
rep.majorCode = majorCode;
rep.minorCode = minorCode;

View File

@ -1038,8 +1038,6 @@ _X_EXPORT int
TryClientEvents(ClientPtr client, xEvent *pEvents, int count, Mask mask,
Mask filter, GrabPtr grab)
{
int i;
int type;
#ifdef DEBUG
@ -1070,12 +1068,6 @@ TryClientEvents(ClientPtr client, xEvent *pEvents, int count, Mask mask,
pEvents->u.u.detail = NotifyNormal;
}
}
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)) {
#ifdef SMART_SCHEDULE
@ -3414,6 +3406,9 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
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;
if (EventCallback) {
EventInfoRec eventinfo;

View File

@ -221,7 +221,6 @@ RRDeliverCrtcEvent(ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc)
ce.type = RRNotify + RREventBase;
ce.subCode = RRNotify_CrtcChange;
ce.sequenceNumber = client->sequence;
ce.timestamp = pScrPriv->lastSetTime.milliseconds;
ce.window = pWin->drawable.id;
ce.crtc = crtc->id;

View File

@ -269,7 +269,6 @@ RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output)
oe.type = RRNotify + RREventBase;
oe.subCode = RRNotify_OutputChange;
oe.sequenceNumber = client->sequence;
oe.timestamp = pScrPriv->lastSetTime.milliseconds;
oe.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
oe.window = pWin->drawable.id;

View File

@ -114,13 +114,11 @@ RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen)
se.type = RRScreenChangeNotify + RREventBase;
se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0);
se.timestamp = pScrPriv->lastSetTime.milliseconds;
se.sequenceNumber = client->sequence;
se.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
se.root = pRoot->drawable.id;
se.window = pWin->drawable.id;
se.subpixelOrder = PictureGetSubpixelOrder(pScreen);
se.sequenceNumber = client->sequence;
if (mode) {
se.sizeID = -1;
for (i = 0; i < output->numModes; i++)

View File

@ -153,7 +153,6 @@ CursorDisplayCursor(ScreenPtr pScreen, CursorPtr pCursor)
ev.type = XFixesEventBase + XFixesCursorNotify;
ev.subtype = XFixesDisplayCursorNotify;
ev.sequenceNumber = e->pClient->sequence;
ev.window = e->pWindow->drawable.id;
ev.cursorSerial = pCursor->serialNumber;
ev.timestamp = currentTime.milliseconds;

View File

@ -81,7 +81,6 @@ XFixesSelectionCallback(CallbackListPtr *callbacks, pointer data, pointer args)
ev.type = XFixesEventBase + XFixesSelectionNotify;
ev.subtype = subtype;
ev.sequenceNumber = e->pClient->sequence;
ev.window = e->pWindow->drawable.id;
if (subtype == XFixesSetSelectionOwnerNotify)
ev.owner = selection->window;