]> git.pld-linux.org Git - packages/foot.git/commitdiff
fix crash in compositors without cursor-shape support; rel 2
authorJan Palus <atler@pld-linux.org>
Fri, 21 Jul 2023 21:55:43 +0000 (23:55 +0200)
committerJan Palus <atler@pld-linux.org>
Fri, 21 Jul 2023 21:55:43 +0000 (23:55 +0200)
from: https://codeberg.org/dnkl/foot/pulls/1411

foot.spec
no-cursor-shape.patch [new file with mode: 0644]

index c41676b244dcd12aad61e10c39045362ede6e87a..7cfd65d56585674427ccb46b5958ef63155c113c 100644 (file)
--- 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 (file)
index 0000000..9ae1d3f
--- /dev/null
@@ -0,0 +1,31 @@
+From 8ebde9f03411593f7652363a82d802ae4e5409c4 Mon Sep 17 00:00:00 2001
+From: xdavidwu <xdavidwuph@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
+
This page took 0.413072 seconds and 4 git commands to generate.