Use C99 designated initializers in dix Events

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Alan Coopersmith
2012-07-09 19:12:44 -07:00
committed by Keith Packard
parent 483266a583
commit 0af79b124e
10 changed files with 203 additions and 205 deletions

View File

@@ -827,12 +827,14 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
free(xi2event);
/* XI 1.x event */
event.deviceid = dev->id;
event.mode = mode;
event.type = (type == XI_FocusIn) ? DeviceFocusIn : DeviceFocusOut;
event.detail = detail;
event.window = pWin->drawable.id;
event.time = currentTime.milliseconds;
event = (deviceFocus) {
.deviceid = dev->id,
.mode = mode,
.type = (type == XI_FocusIn) ? DeviceFocusIn : DeviceFocusOut,
.detail = detail,
.window = pWin->drawable.id,
.time = currentTime.milliseconds
};
DeliverEventsToWindow(dev, pWin, (xEvent *) &event, 1,
DeviceFocusChangeMask, NullGrab);