projects
/
profile
/
ivi
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15b3caf
)
compositor: Avoid sending event for invalid point
author
Rob Bradford
<rob@linux.intel.com>
Wed, 5 Dec 2012 18:47:05 +0000
(18:47 +0000)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 12 Dec 2012 04:47:12 +0000
(23:47 -0500)
Avoid sending a touch down event using uninitialised surface x/y co-ordinates.
Instead present a log message about this unexpected case.
src/compositor.c
patch
|
blob
|
history
diff --git
a/src/compositor.c
b/src/compositor.c
index
17a9203
..
69dfd41
100644
(file)
--- a/
src/compositor.c
+++ b/
src/compositor.c
@@
-1943,6
+1943,13
@@
notify_touch(struct weston_seat *seat, uint32_t time, int touch_id,
} else if (touch->focus) {
es = (struct weston_surface *) touch->focus;
weston_surface_from_global_fixed(es, x, y, &sx, &sy);
+ } else {
+ /* Unexpected condition: We have non-initial touch but
+ * there is no focused surface.
+ */
+ weston_log("touch event received with %d points down"
+ "but no surface focused\n", seat->num_tp);
+ return;
}
grab->interface->down(grab, time, touch_id, sx, sy);