mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 04:40:02 +01:00
Merge branch 'segfault_when_removing_masters' into 'master'
Xi: Fix segfault when removing slave See merge request xorg/xserver!876
This commit is contained in:
commit
f3ac5f1e71
1 changed files with 16 additions and 12 deletions
|
|
@ -82,20 +82,24 @@ XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
|
|||
|
||||
info = (xXIHierarchyInfo *) &ev[1];
|
||||
for (dev = inputInfo.devices; dev; dev = dev->next) {
|
||||
info->deviceid = dev->id;
|
||||
info->enabled = dev->enabled;
|
||||
info->use = GetDeviceUse(dev, &info->attachment);
|
||||
info->flags = flags[dev->id];
|
||||
ev->flags |= info->flags;
|
||||
info++;
|
||||
if (flags[dev->id] && !(flags[dev->id] & (XIMasterRemoved | XISlaveRemoved))) {
|
||||
info->deviceid = dev->id;
|
||||
info->enabled = dev->enabled;
|
||||
info->use = GetDeviceUse(dev, &info->attachment);
|
||||
info->flags = flags[dev->id];
|
||||
ev->flags |= info->flags;
|
||||
info++;
|
||||
}
|
||||
}
|
||||
for (dev = inputInfo.off_devices; dev; dev = dev->next) {
|
||||
info->deviceid = dev->id;
|
||||
info->enabled = dev->enabled;
|
||||
info->use = GetDeviceUse(dev, &info->attachment);
|
||||
info->flags = flags[dev->id];
|
||||
ev->flags |= info->flags;
|
||||
info++;
|
||||
if (flags[dev->id] && !(flags[dev->id] & (XIMasterRemoved | XISlaveRemoved))) {
|
||||
info->deviceid = dev->id;
|
||||
info->enabled = dev->enabled;
|
||||
info->use = GetDeviceUse(dev, &info->attachment);
|
||||
info->flags = flags[dev->id];
|
||||
ev->flags |= info->flags;
|
||||
info++;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < MAXDEVICES; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue