summaryrefslogtreecommitdiff
path: root/dix/property.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-09 19:12:44 -0700
committerKeith Packard <keithp@keithp.com>2012-07-09 22:52:30 -0700
commit0af79b124e1317c36d1613d28755c5a8ce612e2a (patch)
treec2f450fa9e6c7bda1025a80a59fb7887642d3a07 /dix/property.c
parent483266a583b0fd8a552303f318a71502ce3ff1d2 (diff)
Use C99 designated initializers in dix Events
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'dix/property.c')
-rw-r--r--dix/property.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/dix/property.c b/dix/property.c
index 5aa6f4a3c..dec409024 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -108,14 +108,13 @@ dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName,
static void
deliverPropertyNotifyEvent(WindowPtr pWin, int state, Atom atom)
{
- xEvent event;
-
- memset(&event, 0, sizeof(xEvent));
+ xEvent event = {
+ .u.property.window = pWin->drawable.id,
+ .u.property.state = state,
+ .u.property.atom = atom,
+ .u.property.time = currentTime.milliseconds
+ };
event.u.u.type = PropertyNotify;
- event.u.property.window = pWin->drawable.id;
- event.u.property.state = state;
- event.u.property.atom = atom;
- event.u.property.time = currentTime.milliseconds;
DeliverEvents(pWin, &event, 1, (WindowPtr) NULL);
}