summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-04-10 17:12:40 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2012-04-26 13:33:00 +1000
commitb56c1f95bb2d22996651e0a5ca6b6b0e71710a7b (patch)
tree268737e3aebc7c4ad2f47061a4af5451c53f8e61
parent8ca5a94f454d04ed5f1d0b18272a838b8e7f1e7a (diff)
Don't update listener after deactivating implicit pointer grab
After the pointer grab is deactivated, the touch listener record is updated at the end of DeliverTouchEmulatedEvent. However, the touch record is ended when the grab is deactivated, so the update to the listener record is in an array of memory that has been freed. 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> (cherry picked from commit 210cd12c47d063f97915ff23292b61d09abfd73a)
-rw-r--r--Xi/exevents.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index f681a8b6f..80ddfcc7c 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1389,8 +1389,10 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (ev->any.type == ET_TouchEnd &&
!dev->button->buttonsDown &&
- dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab))
+ dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) {
(*dev->deviceGrab.DeactivateGrab) (dev);
+ return Success;
+ }
}
}
else {