[packages/foot] fix crash in compositors without cursor-shape support; rel 2

atler atler at pld-linux.org
Sat Jul 22 01:56:05 CEST 2023


commit b35b059544e679679781397510ae9a6d2a0f840c
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri Jul 21 23:55:43 2023 +0200

    fix crash in compositors without cursor-shape support; rel 2
    
    from: https://codeberg.org/dnkl/foot/pulls/1411

 foot.spec             |  4 +++-
 no-cursor-shape.patch | 31 +++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)
---
diff --git a/foot.spec b/foot.spec
index c41676b..7cfd65d 100644
--- a/foot.spec
+++ b/foot.spec
@@ -5,12 +5,13 @@
 Summary:	A fast, lightweight and minimalistic Wayland terminal emulator
 Name:		foot
 Version:	1.15.0
-Release:	1
+Release:	2
 License:	MIT
 Group:		Applications/Terminal
 Source0:	https://codeberg.org/dnkl/foot/archive/%{version}.tar.gz
 # Source0-md5:	7c73f8008529c42c353f2b1e1b38ffff
 Patch0:		x32.patch
+Patch1:		no-cursor-shape.patch
 URL:		https://codeberg.org/dnkl/foot/
 BuildRequires:	fcft-devel < 4.0.0
 BuildRequires:	fcft-devel >= 3.0.1
@@ -82,6 +83,7 @@ ZSH completion for foot command line.
 %prep
 %setup -q -n %{name}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %meson build \
diff --git a/no-cursor-shape.patch b/no-cursor-shape.patch
new file mode 100644
index 0000000..9ae1d3f
--- /dev/null
+++ b/no-cursor-shape.patch
@@ -0,0 +1,31 @@
+From 8ebde9f03411593f7652363a82d802ae4e5409c4 Mon Sep 17 00:00:00 2001
+From: xdavidwu <xdavidwuph at gmail.com>
+Date: Tue, 18 Jul 2023 21:09:24 +0800
+Subject: [PATCH] wayland: fix pointer cap lost handling
+
+Before this, on compositor without cursor-shape support, a pointer
+capability lost of the seat makes foot crash.
+---
+ wayland.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/wayland.c b/wayland.c
+index 9195797e..0e333573 100644
+--- a/wayland.c
++++ b/wayland.c
+@@ -341,8 +341,10 @@ seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
+     } else {
+         if (seat->wl_pointer != NULL) {
+ #if defined(HAVE_CURSOR_SHAPE)
+-            wp_cursor_shape_device_v1_destroy(seat->pointer.shape_device);
+-            seat->pointer.shape_device = NULL;
++            if (seat->pointer.shape_device != NULL) {
++                wp_cursor_shape_device_v1_destroy(seat->pointer.shape_device);
++                seat->pointer.shape_device = NULL;
++            }
+ #endif
+ 
+             wl_pointer_release(seat->wl_pointer);
+-- 
+2.30.8
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/foot.git/commitdiff/b35b059544e679679781397510ae9a6d2a0f840c



More information about the pld-cvs-commit mailing list