From 9805cedf7b0f76d3b75f94e956c4cc2dcf0d8b64 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 9 Jul 2012 19:12:44 -0700 Subject: Use C99 designated initializers in extension Events Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone --- damageext/damageext.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'damageext') diff --git a/damageext/damageext.c b/damageext/damageext.c index 2eddfb369..222643cc6 100644 --- a/damageext/damageext.c +++ b/damageext/damageext.c @@ -46,15 +46,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; -- cgit v1.2.3