summaryrefslogtreecommitdiffstats
path: root/meta-agl-lxc
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2021-10-09 15:34:35 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2021-11-22 15:33:39 +0900
commit299f87d96044c4c1203d74decaa8b9bb979099b9 (patch)
tree72e166521fcdbdb88d8081d9ca860e26a6848775 /meta-agl-lxc
parent6fe7a95e048be59afcadbd848b56ac86f0fb4fbd (diff)
Add patch to fix weston crash in no input device scene
The weston with ivi-extention crash in no input device scene. This patch add staging patch to wayland-ivi-extention to fix this issue. Bug-AGL: SPEC-4096 Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> Change-Id: I8d3e6627c073213b2fe20df634889a19a730a4d5
Diffstat (limited to 'meta-agl-lxc')
-rw-r--r--meta-agl-lxc/recipes-graphics/wayland/wayland-ivi-extension/0001-Fix-NULL-pointer-exception-in-case-of-no-input-devic.patch55
-rw-r--r--meta-agl-lxc/recipes-graphics/wayland/wayland-ivi-extension_2.2.0.bb3
2 files changed, 57 insertions, 1 deletions
diff --git a/meta-agl-lxc/recipes-graphics/wayland/wayland-ivi-extension/0001-Fix-NULL-pointer-exception-in-case-of-no-input-devic.patch b/meta-agl-lxc/recipes-graphics/wayland/wayland-ivi-extension/0001-Fix-NULL-pointer-exception-in-case-of-no-input-devic.patch
new file mode 100644
index 00000000..095a25c9
--- /dev/null
+++ b/meta-agl-lxc/recipes-graphics/wayland/wayland-ivi-extension/0001-Fix-NULL-pointer-exception-in-case-of-no-input-devic.patch
@@ -0,0 +1,55 @@
+From b1e5973764cc42aee113fcf82249d7dd74de4131 Mon Sep 17 00:00:00 2001
+From: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
+Date: Thu, 7 Oct 2021 21:07:37 +0900
+Subject: [PATCH] Fix NULL pointer exception in case of no input device
+
+When weston with wayland-ivi-extension run without input device,
+that crash by NULL access at setup_input_focus function.
+In this case, st_focus->seat_ctx is NULL pointer, but it use
+without NULL check in this function.
+
+This patch add NULL check for st_focus->seat_ctx.
+
+Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
+---
+ .../src/ivi-input-controller.c | 24 ++++++++++---------
+ 1 file changed, 13 insertions(+), 11 deletions(-)
+
+diff --git a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
+index a0bfc48..e5f2e1d 100644
+--- a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
++++ b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
+@@ -1071,17 +1071,19 @@ setup_input_focus(struct input_context *ctx, uint32_t surface,
+ if (NULL != surf) {
+ wl_list_for_each(st_focus, &surf->accepted_seat_list, link) {
+ ctx_seat = st_focus->seat_ctx;
+- if (device & ILM_INPUT_DEVICE_POINTER) {
+- input_ctrl_ptr_set_focus_surf(ctx_seat, surf, enabled);
+- }
+- if (device & ILM_INPUT_DEVICE_KEYBOARD) {
+- input_ctrl_kbd_set_focus_surf(ctx_seat, surf, enabled);
+- }
+- if (device & ILM_INPUT_DEVICE_TOUCH) {
+- /*Touch focus cannot be forced to a particular surface.
+- * Preserve the old behaviour by sending it to controller.
+- * TODO: Should we just remove focus setting for touch?*/
+- send_input_focus(ctx, surf, device, enabled);
++ if (ctx_seat != NULL) {
++ if (device & ILM_INPUT_DEVICE_POINTER) {
++ input_ctrl_ptr_set_focus_surf(ctx_seat, surf, enabled);
++ }
++ if (device & ILM_INPUT_DEVICE_KEYBOARD) {
++ input_ctrl_kbd_set_focus_surf(ctx_seat, surf, enabled);
++ }
++ if (device & ILM_INPUT_DEVICE_TOUCH) {
++ /*Touch focus cannot be forced to a particular surface.
++ * Preserve the old behaviour by sending it to controller.
++ * TODO: Should we just remove focus setting for touch?*/
++ send_input_focus(ctx, surf, device, enabled);
++ }
+ }
+ }
+ }
+--
+2.25.1
+
diff --git a/meta-agl-lxc/recipes-graphics/wayland/wayland-ivi-extension_2.2.0.bb b/meta-agl-lxc/recipes-graphics/wayland/wayland-ivi-extension_2.2.0.bb
index a172c1bf..26227315 100644
--- a/meta-agl-lxc/recipes-graphics/wayland/wayland-ivi-extension_2.2.0.bb
+++ b/meta-agl-lxc/recipes-graphics/wayland/wayland-ivi-extension_2.2.0.bb
@@ -5,12 +5,13 @@ BUGTRACKER = "http://bugs.genivi.org/enter_bug.cgi?product=Wayland%20IVI%20Exten
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1f1a56bb2dadf5f2be8eb342acf4ed79"
-SRCREV = "e9c2fe4c5034a06b159cfd45dbd485755cbaf4c8"
+SRCREV = "8d4c227ca0a1f836a769a051732a826abbf5d98a"
SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=http \
file://01-ivi-input-controller-update-to-weston-7.patch \
file://02-ivi-id-agent-update-to-weston-7-header.patch \
file://03-ivi-id-agent-update-dependencies-to-build-on-weston-8.patch \
+ file://0001-Fix-NULL-pointer-exception-in-case-of-no-input-devic.patch \
"
S = "${WORKDIR}/git"