desktop: patch mutter crash on grabs by cancelled touches

meta_wayland_touch_cancel() clears focus_surface on active touches
but keeps their serials until the finger lifts. A client asking for
a move/resize grab with such a serial (anotherim-js's resize edges
by touch) makes touch_can_grab_surface() dereference NULL and takes
down gnome-shell (four crashes on 2026-10-13, same address).

Carry a one-line NULL check until nixpkgs' mutter has a fix; it is
not upstream as of mutter 50.2 / main.

Assisted-by: Claude:opus-5
This commit is contained in:
Sergei Poljanski 2026-10-13 06:31:49 +04:00
commit 1320decc26
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -15,6 +15,18 @@
services.displayManager.gdm.enable = true; services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true; services.desktopManager.gnome.enable = true;
# 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.
nixpkgs.overlays = [
(final: prev: {
mutter = prev.mutter.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ../patches/mutter-touch-cancelled-grab.patch ];
});
})
];
# Let systemd-logind own all sleep/idle policy. gsd-power otherwise # Let systemd-logind own all sleep/idle policy. gsd-power otherwise
# second-guesses suspend-then-hibernate and re-wakes the machine before # second-guesses suspend-then-hibernate and re-wakes the machine before
# HibernateDelaySec elapses (observed on P14s G6 AMD). Set via dconf # HibernateDelaySec elapses (observed on P14s G6 AMD). Set via dconf