summaryrefslogtreecommitdiff
path: root/hw/xfree86/dixmods
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
commit9805cedf7b0f76d3b75f94e956c4cc2dcf0d8b64 (patch)
tree466df72bc6e3fdad5a0a682a480af6905bd02780 /hw/xfree86/dixmods
parent0af79b124e1317c36d1613d28755c5a8ce612e2a (diff)
Use C99 designated initializers in extension 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 'hw/xfree86/dixmods')
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 455ff34ad..3d6685265 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -240,7 +240,6 @@ static void
SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
{
XF86VidModeScreenPrivatePtr pPriv;
- XF86VidModeEventPtr pEv;
unsigned long mask;
xXF86VidModeNotifyEvent ev;
int kind;
@@ -253,15 +252,17 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
return;
kind = XF86VidModeModeChange;
for (pEv = pPriv->events; pEv; pEv = pEv->next) {
- if (!(pEv->mask & mask))
- continue;
- ev.type = XF86VidModeNotify + XF86VidModeEventBase;
- ev.state = state;
- ev.timestamp = currentTime.milliseconds;
- ev.root = pScreen->root->drawable.id;
- ev.kind = kind;
- ev.forced = forced;
- WriteEventsToClient(pEv->client, 1, (xEvent *) &ev);
+ if (pEv->mask & mask) {
+ XF86VidModeEventPtr pEv = {
+ .type = XF86VidModeNotify + XF86VidModeEventBase,
+ .state = state,
+ .timestamp = currentTime.milliseconds,
+ .root = pScreen->root->drawable.id,
+ .kind = kind,
+ .forced = forced
+ };
+ WriteEventsToClient(pEv->client, 1, (xEvent *) &ev);
+ }
}
}