Don't clobber virtual core pointer touches array length
The VCP has its own touches array, don't overwrite it when the class is copied from the SD to the master. Reported-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
03d32fe7a7
commit
8573b3519a
|
@ -671,7 +671,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
|
|||
|
||||
if (from->touch)
|
||||
{
|
||||
TouchPointInfoPtr tmp;
|
||||
TouchClassPtr t, f;
|
||||
if (!to->touch)
|
||||
{
|
||||
classes = to->unused_classes;
|
||||
|
@ -692,10 +692,18 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
|
|||
} else
|
||||
classes->touch = NULL;
|
||||
}
|
||||
tmp = to->touch->touches;
|
||||
memcpy(to->touch, from->touch, sizeof(TouchClassRec));
|
||||
to->touch->touches = tmp;
|
||||
to->touch->sourceid = from->id;
|
||||
|
||||
|
||||
t = to->touch;
|
||||
f = from->touch;
|
||||
t->sourceid = f->sourceid;
|
||||
t->max_touches = f->max_touches;
|
||||
t->mode = f->mode;
|
||||
t->buttonsDown = f->buttonsDown;
|
||||
t->state = f->state;
|
||||
t->motionMask = f->motionMask;
|
||||
/* to->touches and to->num_touches are separate on the master,
|
||||
* don't copy */
|
||||
} else if (to->touch)
|
||||
{
|
||||
ClassesPtr classes;
|
||||
|
|
Loading…
Reference in New Issue