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
%prep
%setup -q -n %{name}
%patch0 -p1
+%patch1 -p1
%build
%meson build \
--- /dev/null
+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
+