Xi: set the sourceid for focus devices to the device id.
Unlike Enter/Leave events generated by a device pushing the pointer around, a device doesn't change focus all by itself. It's a result of a SetInputFocus call, a window becoming unviewable or a grab activating. As such, the sourceid for focus events is always the deviceid itself. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
de4dd5848c
commit
0565f4ed45
|
@ -1273,7 +1273,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
|
|||
xi2event->detail = detail;
|
||||
xi2event->time = currentTime.milliseconds;
|
||||
xi2event->deviceid = dev->id;
|
||||
xi2event->sourceid = 0; /*XXX */
|
||||
xi2event->sourceid = dev->id; /* a device doesn't change focus by itself */
|
||||
xi2event->mode = mode;
|
||||
xi2event->root_x = FP1616(mouse->spriteInfo->sprite->hot.x, 0);
|
||||
xi2event->root_y = FP1616(mouse->spriteInfo->sprite->hot.y, 0);
|
||||
|
|
Loading…
Reference in New Issue
Block a user