summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-02-13 16:00:48 -0800
committerPeter Hutterer <peter.hutterer@who-t.net>2012-02-15 11:09:32 +1000
commiteaba06a27c5520a02f08431ac1e4b0e0bdc22cd8 (patch)
treedafeecb745d3a459d6fab35e424e10da239f16b2
parent8573b3519af138a3a12a2e77098718165f9fd8ff (diff)
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>
-rw-r--r--Xi/exevents.c9
1 files 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. */
}
/**