weston: Handle no pointer event
authorMarius Vlad <marius.vlad@collabora.com>
Thu, 5 Oct 2023 13:37:54 +0000 (16:37 +0300)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Fri, 26 Apr 2024 14:15:24 +0000 (16:15 +0200)
This should fix weston-stacking crashing if there's no pointer surface
due to not getting any pointer event. There's an implicit assumption
that we have pointer events if we also have keyboard input focus which
in AGL shell we don't have.

Bug-AGL: SPEC-4916
Change-Id: I2b043108bf41307779bf683f2685701653c1117f
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/29263
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch [new file with mode: 0644]
meta-agl-core/recipes-graphics/wayland/weston_12.0_aglcore.inc

diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch
new file mode 100644 (file)
index 0000000..202333a
--- /dev/null
@@ -0,0 +1,30 @@
+From 6a847464de9e773f6d1490916d0df48a0f90eeba Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Thu, 5 Oct 2023 16:27:34 +0300
+Subject: [PATCH] clients: Handle missing pointer_surface is there's no pointer
+ event
+
+Upstream-Status: Pending
+
+Bug-AGL: SPEC-4916
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ clients/window.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/clients/window.c b/clients/window.c
+index 30f6410..882e9d5 100644
+--- a/clients/window.c
++++ b/clients/window.c
+@@ -3818,7 +3818,7 @@ pointer_surface_frame_callback(void *data, struct wl_callback *callback,
+               force_frame = false;
+       }
+-      if (!input->pointer)
++      if (!input->pointer || !input->pointer_surface)
+               return;
+       if (input_set_pointer_special(input))
+-- 
+2.35.1
+
index 5333d7c..fe13f9e 100644 (file)
@@ -4,6 +4,7 @@ PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting
 
 SRC_URI:append = "file://0001-libweston-weston-log-Add-a-iterator-helper-for-debug.patch \
                  file://0001-toy-toolkit-Fix-rotations.patch \
+                 file://0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch \
 "