aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/damageext/damageext.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-10 14:56:29 +0200
committermarha <marha@users.sourceforge.net>2012-07-10 14:56:29 +0200
commitd137057fd13e83ec15ab416c7fe774741da06047 (patch)
treef4b38caa4f3ecb983f00e84f4f4d8d66699ecbc5 /xorg-server/damageext/damageext.c
parentc29d91cfd8df084f16d0d2dfa82c3a86f7719a73 (diff)
downloadvcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.tar.gz
vcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.tar.bz2
vcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.zip
fontconfig mesa xserver git update 10 Jul 2012
Diffstat (limited to 'xorg-server/damageext/damageext.c')
-rw-r--r--xorg-server/damageext/damageext.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/xorg-server/damageext/damageext.c b/xorg-server/damageext/damageext.c
index f21f71ca8..a942ffa68 100644
--- a/xorg-server/damageext/damageext.c
+++ b/xorg-server/damageext/damageext.c
@@ -26,6 +26,7 @@
#include "damageextint.h"
#include "protocol-versions.h"
+#include "extinit.h"
static unsigned char DamageReqCode;
static int DamageEventBase;
@@ -46,15 +47,17 @@ DamageExtNotify(DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes)
int i;
UpdateCurrentTimeIf();
- ev.type = DamageEventBase + XDamageNotify;
- ev.level = pDamageExt->level;
- ev.drawable = pDamageExt->drawable;
- ev.damage = pDamageExt->id;
- ev.timestamp = currentTime.milliseconds;
- ev.geometry.x = pDrawable->x;
- ev.geometry.y = pDrawable->y;
- ev.geometry.width = pDrawable->width;
- ev.geometry.height = pDrawable->height;
+ ev = (xDamageNotifyEvent) {
+ .type = DamageEventBase + XDamageNotify,
+ .level = pDamageExt->level,
+ .drawable = pDamageExt->drawable,
+ .damage = pDamageExt->id,
+ .timestamp = currentTime.milliseconds,
+ .geometry.x = pDrawable->x,
+ .geometry.y = pDrawable->y,
+ .geometry.width = pDrawable->width,
+ .geometry.height = pDrawable->height
+ };
if (pBoxes) {
for (i = 0; i < nBoxes; i++) {
ev.level = pDamageExt->level;
@@ -126,14 +129,16 @@ static int
ProcDamageQueryVersion(ClientPtr client)
{
DamageClientPtr pDamageClient = GetDamageClient(client);
- xDamageQueryVersionReply rep;
+ xDamageQueryVersionReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
REQUEST(xDamageQueryVersionReq);
REQUEST_SIZE_MATCH(xDamageQueryVersionReq);
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
+
if (stuff->majorVersion < SERVER_DAMAGE_MAJOR_VERSION) {
rep.majorVersion = stuff->majorVersion;
rep.minorVersion = stuff->minorVersion;
@@ -154,7 +159,7 @@ ProcDamageQueryVersion(ClientPtr client)
swapl(&rep.majorVersion);
swapl(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xDamageQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xDamageQueryVersionReply), &rep);
return Success;
}