meta-agl-bsp: Update i.MX8MQ EVK support for kirkstone
[AGL/meta-agl.git] / meta-agl-bsp / meta-ti / recipes-arago / weston / weston / 0004-weston-Fix-touch-screen-crash-issue.patch
1 From 60250e9dc57fe56148c8a24bba107bce8a873fb4 Mon Sep 17 00:00:00 2001
2 From: Karthik Ramanan <a0393906@ti.com>
3 Date: Mon, 12 Mar 2018 10:56:28 +0530
4 Subject: [PATCH 4/4] weston: 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 Upstream status: pending
13
14 Signed-off-by: Eric Ruei <e-ruei1@ti.com>
15 Signed-off-by: Karthik Ramanan <a0393906@ti.com>
16 ---
17  libweston/input.c | 6 ++++++
18  1 file changed, 6 insertions(+)
19
20 diff --git a/libweston/input.c b/libweston/input.c
21 index 4fedc55..bcb2f28 100644
22 --- a/libweston/input.c
23 +++ b/libweston/input.c
24 @@ -2185,6 +2185,12 @@ notify_touch(struct weston_seat *seat, uint32_t time, int touch_id,
25                  * until all touch points are up again. */
26                 if (touch->num_tp == 1) {
27                         ev = weston_compositor_pick_view(ec, x, y, &sx, &sy);
28 +                       if (!ev)
29 +                       {
30 +                               weston_log("notify_touch: weston_compositor_pick_view(%d, %d) failed to find a view!\n",
31 +                                                       wl_fixed_to_int(x), wl_fixed_to_int(y));
32 +                               return;
33 +                       }
34                         weston_touch_set_focus(touch, ev);
35                 } else if (!touch->focus) {
36                         /* Unexpected condition: We have non-initial touch but
37 -- 
38 1.9.1
39