dra7xx-evm: weston: add changes for AGL home screen
[AGL/meta-agl.git] / meta-agl-bsp / meta-ti / recipes-arago / weston / weston / 0004-Weston1.9.0-Fix-touch-screen-crash-issue.patch
1 From 9a7c0e7b6ae9700069756b33d2ea726e58b552ed Mon Sep 17 00:00:00 2001
2 From: Eric Ruei <e-ruei1@ti.com>
3 Date: Wed, 16 Mar 2016 16:50:31 -0400
4 Subject: [PATCH 4/4] Weston1.9.0: Fix touch screen crash issue
5
6 Touch screen operation causes the weston to crash with segment fault sometimes.
7 The crash occurs when the coordinate (x,y) passed to the weston input module
8 is outside the view window, hence the weston compositor is not able to pick
9 up a display view and there is no code to detect this condition at function
10 notify_touch().
11
12
13 Signed-off-by: Eric Ruei <e-ruei1@ti.com>
14 ---
15  src/input.c | 6 ++++++
16  1 file changed, 6 insertions(+)
17
18 diff --git a/src/input.c b/src/input.c
19 index e230c83..fd8e53f 100644
20 --- a/src/input.c
21 +++ b/src/input.c
22 @@ -1566,6 +1566,12 @@ notify_touch(struct weston_seat *seat, uint32_t time, int touch_id,
23                  * until all touch points are up again. */
24                 if (touch->num_tp == 1) {
25                         ev = weston_compositor_pick_view(ec, x, y, &sx, &sy);
26 +                       if (!ev)
27 +                       {
28 +                               weston_log("notify_touch: weston_compositor_pick_view(%d, %d) failed to find a view!\n",
29 +                                                       wl_fixed_to_int(x), wl_fixed_to_int(y));
30 +                               return;
31 +                       }
32                         weston_touch_set_focus(touch, ev);
33                 } else if (!touch->focus) {
34                         /* Unexpected condition: We have non-initial touch but
35 -- 
36 1.9.1
37