aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/shape.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-11 11:55:48 +0200
committermarha <marha@users.sourceforge.net>2012-07-11 11:55:48 +0200
commit6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab (patch)
tree21e1af7ee94600e349ae21353dc11963a06e988d /xorg-server/Xext/shape.c
parent75f57cf199b6c042b0f7515e3a1ab80f7ccecfab (diff)
parentd137057fd13e83ec15ab416c7fe774741da06047 (diff)
downloadvcxsrv-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/Xext/shape.c')
-rw-r--r--xorg-server/Xext/shape.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/xorg-server/Xext/shape.c b/xorg-server/Xext/shape.c
index d3859a51d..dfe6fe70b 100644
--- a/xorg-server/Xext/shape.c
+++ b/xorg-server/Xext/shape.c
@@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/extensions/shapeproto.h>
#include "regionstr.h"
#include "gcstruct.h"
-#include "modinit.h"
+#include "extinit.h"
#include "protocol-versions.h"
typedef RegionPtr (*CreateDftPtr) (WindowPtr /* pWin */
@@ -211,8 +211,8 @@ ProcShapeQueryVersion(ClientPtr client)
REQUEST_SIZE_MATCH(xShapeQueryVersionReq);
memset(&rep, 0, sizeof(xShapeQueryVersionReply));
rep.type = X_Reply;
- rep.length = 0;
rep.sequenceNumber = client->sequence;
+ rep.length = 0;
rep.majorVersion = SERVER_SHAPE_MAJOR_VERSION;
rep.minorVersion = SERVER_SHAPE_MINOR_VERSION;
if (client->swapped) {
@@ -221,7 +221,7 @@ ProcShapeQueryVersion(ClientPtr client)
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xShapeQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xShapeQueryVersionReply), &rep);
return Success;
}
@@ -635,8 +635,8 @@ ProcShapeQueryExtents(ClientPtr client)
return rc;
memset(&rep, 0, sizeof(xShapeQueryExtentsReply));
rep.type = X_Reply;
- rep.length = 0;
rep.sequenceNumber = client->sequence;
+ rep.length = 0;
rep.boundingShaped = (wBoundingShape(pWin) != 0);
rep.clipShaped = (wClipShape(pWin) != 0);
if ((region = wBoundingShape(pWin))) {
@@ -681,7 +681,7 @@ ProcShapeQueryExtents(ClientPtr client)
swaps(&rep.widthClipShape);
swaps(&rep.heightClipShape);
}
- WriteToClient(client, sizeof(xShapeQueryExtentsReply), (char *) &rep);
+ WriteToClient(client, sizeof(xShapeQueryExtentsReply), &rep);
return Success;
}
@@ -826,7 +826,6 @@ void
SendShapeNotify(WindowPtr pWin, int which)
{
ShapeEventPtr *pHead, pShapeEvent;
- xShapeNotifyEvent se;
BoxRec extents;
RegionPtr region;
BYTE shaped;
@@ -883,6 +882,7 @@ SendShapeNotify(WindowPtr pWin, int which)
return;
}
for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) {
+ xShapeNotifyEvent se;
se.type = ShapeNotify + ShapeEventBase;
se.kind = which;
se.window = pWin->drawable.id;
@@ -922,15 +922,17 @@ ProcShapeInputSelected(ClientPtr client)
}
}
}
+
rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
rep.enabled = enabled;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
}
- WriteToClient(client, sizeof(xShapeInputSelectedReply), (char *) &rep);
+ WriteToClient(client, sizeof(xShapeInputSelectedReply), &rep);
return Success;
}
@@ -1003,19 +1005,21 @@ ProcShapeGetRectangles(ClientPtr client)
rects[i].height = box->y2 - box->y1;
}
}
+
rep.type = X_Reply;
+ rep.ordering = YXBanded;
rep.sequenceNumber = client->sequence;
rep.length = bytes_to_int32(nrects * sizeof(xRectangle));
- rep.ordering = YXBanded;
rep.nrects = nrects;
+
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swapl(&rep.nrects);
SwapShorts((short *) rects, (unsigned long) nrects * 4);
}
- WriteToClient(client, sizeof(rep), (char *) &rep);
- WriteToClient(client, nrects * sizeof(xRectangle), (char *) rects);
+ WriteToClient(client, sizeof(rep), &rep);
+ WriteToClient(client, nrects * sizeof(xRectangle), rects);
free(rects);
return Success;
}