From eaba06a27c5520a02f08431ac1e4b0e0bdc22cd8 Mon Sep 17 00:00:00 2001 From: Chase Douglas Date: Mon, 13 Feb 2012 16:00:48 -0800 Subject: [PATCH] Keep virtual core pointer touch class around if new slave doesn't have one 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 Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- Xi/exevents.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index ca8060d78..f390f6739 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -704,13 +704,10 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) t->motionMask = f->motionMask; /* to->touches and to->num_touches are separate on the master, * don't copy */ - } 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. */ } /**