The VCP may have active touch grabs. The touch records must be kept so these touch grabs may be accepted/rejected in the future. This means the touch class list will not represent the touch class of the attached slave device if it does not have a touch class, but we already were breaking that assumption by keeping a separate touches array for the VCP.
Signed-off-by: Chase Douglas <[email protected]> --- I haven't seen this cause a crash in the wild, and I haven't stress tested it, but I don't see how accept/reject could work after we switch to a non-touch slave device without this change. Xi/exevents.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 51f991c..069a52c 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -699,13 +699,10 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) to->touch->touches = to_touches_array_tmp; to->touch->num_touches = to_num_touches_tmp; to->touch->sourceid = from->id; - } else if (to->touch) - { - ClassesPtr classes; - classes = to->unused_classes; - classes->touch = to->touch; - to->touch = NULL; } + /* Don't remove touch class if from->touch is non-existent. The to device + * may have an active touch grab, so we need to keep the touch class record + * around. */ } /** -- 1.7.9 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
