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 | 2f5caeaddb3616dc9ff57d784f7feba589c536e7 (patch) | |
tree | 1909962a69a7a643c6f66b0320416cbdca191e59 /Xi/xiquerypointer.c | |
parent | 6a721e3af5e11bae1d59ca551a02470f35d9e844 (diff) |
Use C99 designated initializers in Xinput 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 'Xi/xiquerypointer.c')
-rw-r--r-- | Xi/xiquerypointer.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c index e09a1f694..7e6852dd0 100644 --- a/Xi/xiquerypointer.c +++ b/Xi/xiquerypointer.c @@ -121,15 +121,16 @@ ProcXIQueryPointer(ClientPtr client) pSprite = pDev->spriteInfo->sprite; - memset(&rep, 0, sizeof(rep)); - rep.repType = X_Reply; - rep.RepType = X_XIQueryPointer; - rep.length = 6; - rep.sequenceNumber = client->sequence; - rep.root = (GetCurrentRootWindow(pDev))->drawable.id; - rep.root_x = FP1616(pSprite->hot.x, 0); - rep.root_y = FP1616(pSprite->hot.y, 0); - rep.child = None; + rep = (xXIQueryPointerReply) { + .repType = X_Reply, + .RepType = X_XIQueryPointer, + .sequenceNumber = client->sequence, + .length = 6, + .root = (GetCurrentRootWindow(pDev))->drawable.id, + .root_x = FP1616(pSprite->hot.x, 0), + .root_y = FP1616(pSprite->hot.y, 0), + .child = None + }; if (kbd) { state = &kbd->key->xkbInfo->state; |