summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-29 16:46:45 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-30 11:04:32 +1000
commit0565f4ed4519962bed40a0bbcf0b409471f4de40 (patch)
tree36f7fe5aa3b33a2039d246f8ed20a0cd31cc2b8e /Xi
parentde4dd5848cab90b0f8b8243ca0b49985ef047124 (diff)
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>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 4773c4959..85d14b09b 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -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);