Files
mrcha033 6b1eddef7a fix(libei): only restart the capture session on device change under GNOME
`EiEvent::DeviceRemoved` currently tears down and recreates the whole
input-capture session. That is a workaround for mutter, which stops
delivering events after a device change, but it is applied on every
compositor.

Elsewhere the restart is pure overhead: every device change costs a
CreateSession + ConnectToEIS round trip. On compositors that keep
per-session state around it is worse than overhead - Hyprland keeps a
keymap fd per EIS session and never reaps sessions whose client went
away, so the churn drives it out of file descriptors and eventually
crashes it. On this machine the churn ran at ~35 ConnectToEIS per 38
minutes; gating it to GNOME brought that to 0 with no change in capture
behaviour.

`SeatRemoved` still releases unconditionally - a seat going away really
does invalidate the session.

The default is derived from XDG_CURRENT_DESKTOP and can be overridden
with LM_RESTART_SESSION_ON_DEVICE_CHANGE=1/0 for compositors that need
the mutter behaviour but do not advertise themselves as GNOME.
2026-08-31 14:11:10 +02:00
..
2026-05-19 11:26:06 +02:00
2026-06-20 01:17:02 +02:00