summaryrefslogtreecommitdiff
path: root/Xi/xipassivegrab.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xi/xipassivegrab.c')
-rw-r--r--Xi/xipassivegrab.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 5e4fa4e60..ddab53dec 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -78,7 +78,13 @@ int
ProcXIPassiveGrabDevice(ClientPtr client)
{
DeviceIntPtr dev, mod_dev;
- xXIPassiveGrabDeviceReply rep;
+ xXIPassiveGrabDeviceReply rep = {
+ .repType = X_Reply,
+ .RepType = X_XIPassiveGrabDevice,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .num_modifiers = 0
+ };
int i, ret = Success;
uint32_t *modifiers;
xXIGrabModifierInfo *modifiers_failed;
@@ -137,12 +143,6 @@ ProcXIPassiveGrabDevice(ClientPtr client)
xi2mask_set_one_mask(mask.xi2mask, stuff->deviceid,
(unsigned char *) &stuff[1], mask_len * 4);
- rep.repType = X_Reply;
- rep.RepType = X_XIPassiveGrabDevice;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.num_modifiers = 0;
-
memset(&param, 0, sizeof(param));
param.grabtype = XI2;
param.ownerEvents = stuff->owner_events;