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 <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Chase Douglas 2012-02-13 16:00:48 -08:00 committed by Peter Hutterer
parent 8573b3519a
commit eaba06a27c

View File

@ -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. */
}
/**