diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-09 19:12:43 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-09 19:58:30 -0700 |
commit | 6a721e3af5e11bae1d59ca551a02470f35d9e844 (patch) | |
tree | b95dd0d69fca66321f010959e69c44f781452c1f /Xext/panoramiXprocs.c | |
parent | d792ac125a0462a04a930af543cbc732f8cdab7d (diff) |
Use C99 designated initializers in Xext Replies
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 'Xext/panoramiXprocs.c')
-rw-r--r-- | Xext/panoramiXprocs.c | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index bdabfbf03..576844cbf 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -566,14 +566,18 @@ PanoramiXGetGeometry(ClientPtr client) if (rc != Success) return rc; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.root = screenInfo.screens[0]->root->drawable.id; - rep.depth = pDraw->depth; - rep.width = pDraw->width; - rep.height = pDraw->height; - rep.x = rep.y = rep.borderWidth = 0; + rep = (xGetGeometryReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .root = screenInfo.screens[0]->root->drawable.id, + .depth = pDraw->depth, + .width = pDraw->width, + .height = pDraw->height, + .x = 0, + .y = 0, + .borderWidth = 0 + }; if (stuff->id == rep.root) { xWindowRoot *root = (xWindowRoot *) @@ -617,11 +621,13 @@ PanoramiXTranslateCoords(ClientPtr client) rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixReadAccess); if (rc != Success) return rc; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.sameScreen = xTrue; - rep.child = None; + rep = (xTranslateCoordsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .sameScreen = xTrue, + .child = None + }; if ((pWin == screenInfo.screens[0]->root) || (pWin->drawable.id == screenInfo.screens[0]->screensaver.wid)) { @@ -1954,10 +1960,12 @@ PanoramiXGetImage(ClientPtr client) return rc; } - xgi.visual = wVisual(((WindowPtr) pDraw)); - xgi.type = X_Reply; - xgi.sequenceNumber = client->sequence; - xgi.depth = pDraw->depth; + xgi = (xGetImageReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .visual = wVisual(((WindowPtr) pDraw)), + .depth = pDraw->depth + }; if (format == ZPixmap) { widthBytesLine = PixmapBytePad(w, pDraw->depth); length = widthBytesLine * h; |