summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland/weston/0020-xwayland-Fix-crash-when-run-with-no-input-device.patch
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2017-01-16 13:52:26 -0600
committerOtavio Salvador <otavio@ossystems.com.br>2017-01-23 16:55:31 -0200
commitafa03c974b95026219aadc8440d44bf05c26757d (patch)
tree4a3bc9f2b6283cd95c7e689ea11285af808b85e2 /recipes-graphics/wayland/weston/0020-xwayland-Fix-crash-when-run-with-no-input-device.patch
parent599f72c34c826142ed56c41261163f795dcdfa18 (diff)
downloadmeta-freescale-afa03c974b95026219aadc8440d44bf05c26757d.tar.gz
weston: Touch events cause startup failure
Pressing the touch panel continously during boot up caused weston to crash. The weston view was being accessed before it was fully initialized, so now we guard against this. Upstream-Status: Denied [Could not reproduce] Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-graphics/wayland/weston/0020-xwayland-Fix-crash-when-run-with-no-input-device.patch')
-rw-r--r--recipes-graphics/wayland/weston/0020-xwayland-Fix-crash-when-run-with-no-input-device.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston/0020-xwayland-Fix-crash-when-run-with-no-input-device.patch b/recipes-graphics/wayland/weston/0020-xwayland-Fix-crash-when-run-with-no-input-device.patch
new file mode 100644
index 00000000..1304cef2
--- /dev/null
+++ b/recipes-graphics/wayland/weston/0020-xwayland-Fix-crash-when-run-with-no-input-device.patch
@@ -0,0 +1,45 @@
1From 60f8817f371123b9c36b3ff1120eec1e8f9e3d10 Mon Sep 17 00:00:00 2001
2From: Tom Hochstein <tom.hochstein@nxp.com>
3Date: Mon, 31 Oct 2016 19:21:58 -0500
4Subject: [PATCH weston] xwayland: Fix crash when run with no input device
5
6Starting an xterm with no input device led to a crash
7because weston_wm_pick_seat() was returning garbage and
8weston_wm_selection_init() was trying to use the garbage.
9
10Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
11---
12 xwayland/selection.c | 10 +++++++---
13 xwayland/window-manager.c | 6 ++++--
14 2 files changed, 11 insertions(+), 5 deletions(-)
15
16Index: weston-1.11.0/xwayland/selection.c
17===================================================================
18--- weston-1.11.0.orig/xwayland/selection.c 2016-05-19 16:36:04.000000000 -0500
19+++ weston-1.11.0/xwayland/selection.c 2016-11-01 14:32:48.000000000 -0500
20@@ -708,6 +708,8 @@
21 wm->atom.clipboard, mask);
22
23 seat = weston_wm_pick_seat(wm);
24+ if (seat != NULL)
25+ return;
26 wm->selection_listener.notify = weston_wm_set_selection;
27 wl_signal_add(&seat->selection_signal, &wm->selection_listener);
28
29Index: weston-1.11.0/xwayland/window-manager.c
30===================================================================
31--- weston-1.11.0.orig/xwayland/window-manager.c 2016-05-19 16:36:04.000000000 -0500
32+++ weston-1.11.0/xwayland/window-manager.c 2016-11-01 11:47:14.549606964 -0500
33@@ -1303,8 +1303,10 @@
34 struct weston_seat *
35 weston_wm_pick_seat(struct weston_wm *wm)
36 {
37- return container_of(wm->server->compositor->seat_list.next,
38- struct weston_seat, link);
39+ struct wl_list *seats = wm->server->compositor->seat_list.next;
40+ if (wl_list_empty(seats))
41+ return NULL;
42+ return container_of(seats, struct weston_seat, link);
43 }
44
45 static struct weston_seat *