After `swaymsg reload`, pointer button release events are dropped until sway restarts (presses delivered, releases never sent)
Sway Version
sway version 1.12
sway 1:1.12-4.1 (CachyOS/Arch Linux, bundled wlroots)
foot 1.27.0Configuration File
Repro config (minimal — the input path contains nothing pointer-related; no seat, input pointer/touchpad, or mouse bindsym lines):
set $mod Mod4
input type:keyboard {
xkb_layout us
}
exec foot
bindsym $mod+Shift+R reload(Verified on the full config too — the only input block is the keyboard xkb one above.)
Description
After a swaymsg reload, sway stops delivering pointer button release events to clients. Button presses are delivered normally; releases are silently dropped until sway is fully restarted. A device toggle (swaymsg input type:pointer events disabled then enabled) does not restore releases.
Repro steps:
- Start sway, open a foot terminal, and a second terminal running
WAYLAND_DEBUG=1 foot. swaymsg reload.- Single left-click in the debug terminal.
Observed after reload:
wl_pointer.button(..., 272, 1)(press) is delivered; the matching(..., 272, 0)(release) never arrives.- Single clicks do nothing in any client (foot: cursor never places; waybar: workspace buttons don't respond).
- Right-click works (foot context menu opens — acts on press).
- Double-click works (word-select — triggered by two presses).
- Click-drag (text block selection) never completes (no release).
- The release events are dropped until sway restarts; a fresh sway delivers clean press/release pairs.
Raw evdev capture of the physical mouse during the broken state shows clean BTN_LEFT press+release pairs (~80 ms apart) — the kernel and libinput are fine; the drops happen inside sway/wlroots.
Protocol trace excerpt (WAYLAND_DEBUG=1, client side; button 272 = left, 273 = right; 15 presses, 0 releases in the whole session):
wl_pointer#28.button(91804, 44897925, 272, 1) <- press
wl_pointer#28.button(91899, 44899005, 272, 1) <- press
wl_pointer#28.button(91941, 44899509, 273, 1) <- right press
wl_pointer#28.button(92005, 44900260, 272, 1) <- press
... (no state=0 events anywhere)Hypothesis
Reload removes and re-adds input devices, and sway emits a synthetic button press for the re-add with no matching release (the same device re-add mechanism behind #8852). Since wlroots 8730ca9 ("seat/pointer: handle duplicate presses/releases correctly") tracks pressed buttons as a multiset, the phantom press leaves the count stuck at >= 1, and every real release is suppressed until the count reaches zero — which never happens without a restart.
Related
- #8852 — reload emits bogus input events via device remove/re-add (keyboard variant, same mechanism).
- #8284 — same release-suppression signature (presses delivered, releases dropped, right-click works), root-caused to wlroots
8730ca9; different trigger (duplicate presses fromseat - cursor pressbindings), fixed by a restart there too. - #7343 — related release-event mishandling family.
This issue is the pointer + reload-trigger variant: no mouse bindings in the config, deterministic on every reload, only recoverable via full restart.
Source: swaywm/sway