mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-26 08:15:24 +00:00
Xi: ensure the deviceid for DeviceChangedEvents is always the right one
If we're sending the event for a given device, make sure the deviceid is that of the device. This allows callers to use the same DCE for slave and master without having to fiddle the DCE's internal fields. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
@@ -699,6 +699,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce)
|
||||
|
||||
/* FIXME: the classes may have changed since we generated the event. */
|
||||
DeepCopyDeviceClasses(slave, device, dce);
|
||||
dce->deviceid = device->id;
|
||||
XISendDeviceChangedEvent(device, dce);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user