diff options
author | marha <marha@users.sourceforge.net> | 2012-07-11 11:55:48 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-07-11 11:55:48 +0200 |
commit | 6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab (patch) | |
tree | 21e1af7ee94600e349ae21353dc11963a06e988d /xorg-server/dix/property.c | |
parent | 75f57cf199b6c042b0f7515e3a1ab80f7ccecfab (diff) | |
parent | d137057fd13e83ec15ab416c7fe774741da06047 (diff) | |
download | vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.gz vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.bz2 vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/Xext/shm.c
xorg-server/Xext/sync.c
xorg-server/Xext/xf86bigfont.c
xorg-server/Xi/opendev.c
xorg-server/dix/dispatch.c
xorg-server/include/globals.h
xorg-server/mi/miinitext.c
Diffstat (limited to 'xorg-server/dix/property.c')
-rw-r--r-- | xorg-server/dix/property.c | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/xorg-server/dix/property.c b/xorg-server/dix/property.c index b1b83124f..833c3ca59 100644 --- a/xorg-server/dix/property.c +++ b/xorg-server/dix/property.c @@ -108,14 +108,13 @@ dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName, static void deliverPropertyNotifyEvent(WindowPtr pWin, int state, Atom atom) { - xEvent event; - - memset(&event, 0, sizeof(xEvent)); - event.u.u.type = PropertyNotify; + xEvent event; memset(&event, 0, sizeof(xEvent)); event.u.property.window = pWin->drawable.id; event.u.property.state = state; event.u.property.atom = atom; event.u.property.time = currentTime.milliseconds; + + event.u.u.type = PropertyNotify; DeliverEvents(pWin, &event, 1, (WindowPtr) NULL); } @@ -413,15 +412,17 @@ DeleteAllWindowProperties(WindowPtr pWin) } static int -NullPropertyReply(ClientPtr client, - ATOM propertyType, int format, xGetPropertyReply * reply) +NullPropertyReply(ClientPtr client, ATOM propertyType, int format) { - reply->nItems = 0; - reply->length = 0; - reply->bytesAfter = 0; - reply->propertyType = propertyType; - reply->format = format; - WriteReplyToClient(client, sizeof(xGenericReply), reply); + xGetPropertyReply reply; + reply.type = X_Reply; + reply.format = format; + reply.sequenceNumber = client->sequence; + reply.length = 0; + reply.propertyType = propertyType; + reply.bytesAfter = 0; + reply.nItems = 0; + WriteReplyToClient(client, sizeof(xGenericReply), &reply); return Success; } @@ -470,13 +471,9 @@ ProcGetProperty(ClientPtr client) return BadAtom; } - memset(&reply, 0, sizeof(xGetPropertyReply)); - reply.type = X_Reply; - reply.sequenceNumber = client->sequence; - rc = dixLookupProperty(&pProp, pWin, stuff->property, client, prop_mode); if (rc == BadMatch) - return NullPropertyReply(client, None, 0, &reply); + return NullPropertyReply(client, None, 0); else if (rc != Success) return rc; @@ -485,6 +482,9 @@ ProcGetProperty(ClientPtr client) if (((stuff->type != pProp->type) && (stuff->type != AnyPropertyType)) ) { + memset(&reply, 0, sizeof(xGetPropertyReply)); + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; reply.bytesAfter = pProp->size; reply.format = pProp->format; reply.length = 0; @@ -510,6 +510,9 @@ ProcGetProperty(ClientPtr client) len = min(n - ind, 4 * stuff->longLength); + memset(&reply, 0, sizeof(xGetPropertyReply)); + reply.type = X_Reply; + reply.sequenceNumber = client->sequence, reply.bytesAfter = n - (ind + len); reply.format = pProp->format; reply.length = bytes_to_int32(len); @@ -589,10 +592,12 @@ ProcListProperties(ClientPtr client) } } + xlpr.type = X_Reply; - xlpr.nProperties = numProps; - xlpr.length = bytes_to_int32(numProps * sizeof(Atom)); xlpr.sequenceNumber = client->sequence; + xlpr.length = bytes_to_int32(numProps * sizeof(Atom)); + xlpr.nProperties = numProps; + WriteReplyToClient(client, sizeof(xGenericReply), &xlpr); if (numProps) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; |