aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/damageext
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
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')
-rw-r--r--xorg-server/damageext/Makefile.am15
-rw-r--r--xorg-server/damageext/damageext.c33
-rw-r--r--xorg-server/damageext/damageextint.h1
3 files changed, 26 insertions, 23 deletions
diff --git a/xorg-server/damageext/Makefile.am b/xorg-server/damageext/Makefile.am
index b082fd2cf..4d4cf4478 100644
--- a/xorg-server/damageext/Makefile.am
+++ b/xorg-server/damageext/Makefile.am
@@ -1,8 +1,7 @@
-noinst_LTLIBRARIES = libdamageext.la
-
-AM_CFLAGS = $(DIX_CFLAGS)
-
-libdamageext_la_SOURCES = \
- damageext.c \
- damageext.h \
- damageextint.h
+noinst_LTLIBRARIES = libdamageext.la
+
+AM_CFLAGS = $(DIX_CFLAGS)
+
+libdamageext_la_SOURCES = \
+ damageext.c \
+ damageextint.h
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;
}
diff --git a/xorg-server/damageext/damageextint.h b/xorg-server/damageext/damageextint.h
index b7e63e077..272337922 100644
--- a/xorg-server/damageext/damageextint.h
+++ b/xorg-server/damageext/damageextint.h
@@ -37,7 +37,6 @@
#include "windowstr.h"
#include "selection.h"
#include "scrnintstr.h"
-#include "damageext.h"
#include "damage.h"
#include "xfixes.h"