aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/damageext
diff options
context:
space:
mode:
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"