aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/xisetdevfocus.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xi/xisetdevfocus.c')
-rw-r--r--xorg-server/Xi/xisetdevfocus.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xorg-server/Xi/xisetdevfocus.c b/xorg-server/Xi/xisetdevfocus.c
index b52c9cc99..372ec248a 100644
--- a/xorg-server/Xi/xisetdevfocus.c
+++ b/xorg-server/Xi/xisetdevfocus.c
@@ -97,10 +97,12 @@ ProcXIGetFocus(ClientPtr client)
if (!dev->focus)
return BadDevice;
- rep.repType = X_Reply;
- rep.RepType = X_XIGetFocus;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
+ rep = (xXIGetFocusReply) {
+ .repType = X_Reply,
+ .RepType = X_XIGetFocus,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
if (dev->focus->win == NoneWin)
rep.focus = None;
@@ -121,5 +123,5 @@ SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep)
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swapl(&rep->focus);
- WriteToClient(client, len, (char *) rep);
+ WriteToClient(client, len, rep);
}