From 819072c2a0df9ebc68946e9cdbc862fe97dde7ca Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Tue, 13 Oct 2026 08:24:00 +0400 Subject: [PATCH] desktop: point the mutter touch patch at upstream !5375 The crash is mutter issue #4871, a regression from !5057, and !5375 ("wayland/touch: Do not crash on empty focus surface") carries the same NULL check as our patch. Say so in the overlay and the patch, so it is clear when the patch can go. Assisted-by: Claude:opus-5 --- modules/desktop.nix | 7 +++++-- patches/mutter-touch-cancelled-grab.patch | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/desktop.nix b/modules/desktop.nix index 5291afc..8185c6a 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -17,8 +17,11 @@ # gnome-shell segfaults in touch_can_grab_surface() when a client asks for # a move/resize grab with the serial of a cancelled touch (NULL - # focus_surface). Not fixed upstream as of mutter 50.2 / main 2026-10-13. - # Drop once nixpkgs' mutter carries a fix. + # focus_surface); a mutter 50 regression from !5057. Upstream issue + # https://gitlab.gnome.org/GNOME/mutter/-/work_items/4871, fix in + # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/5375 ("wayland/touch: + # Do not crash on empty focus surface"), the same NULL check as this patch. + # Drop once nixpkgs' mutter carries !5375. nixpkgs.overlays = [ (final: prev: { mutter = prev.mutter.overrideAttrs (old: { diff --git a/patches/mutter-touch-cancelled-grab.patch b/patches/mutter-touch-cancelled-grab.patch index 687fcaf..d7a8d3f 100644 --- a/patches/mutter-touch-cancelled-grab.patch +++ b/patches/mutter-touch-cancelled-grab.patch @@ -14,6 +14,9 @@ touch_can_grab_surface(), which dereferences the NULL focus_surface: #3 xdg_toplevel_resize A cancelled touch cannot grab anything; treat it as such. + +Upstream: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/5375 +(closes https://gitlab.gnome.org/GNOME/mutter/-/work_items/4871) --- --- a/src/wayland/meta-wayland-touch.c +++ b/src/wayland/meta-wayland-touch.c