Skip to content

wayland: bind only the first wl_seat - #159

Merged
vaxerski merged 1 commit into
hyprwm:mainfrom
UncleJ4ck:fix-bind-first-seat
Nov 13, 2026
Merged

vaxerski merged 1 commit into
hyprwm:mainfrom
UncleJ4ck:fix-bind-first-seat

Conversation

@UncleJ4ck

Copy link
Copy Markdown
Contributor

Reopens @andyhennie's fix from #145, which the autocloser closed as unvouched. This is their diagnosis and commit, verbatim, authorship preserved.

CWaylandPlatform's registry handler rebinds m_waylandState.seat for every wl_seat global and releases the previous one, so when the compositor advertises more than one seat we keep whichever came last, which may not carry the user's input. That is why hyprland-dialog (and Hyprland's ANR dialog, and hyprpolkitagent) stop responding to the real mouse on multi-seat setups. Guard the bind so only the first seat is taken.

Single-seat sessions are unaffected: the guard !m_waylandState.seat is true on the first and only seat, so the bind path is identical. Multi-seat verified by @andyhennie on Hyprland 0.56.2 / hyprland-guiutils 0.2.2 via LD_LIBRARY_PATH: with the fix the dialog binds wl_seat#4.name("Hyprland") and real clicks reach it. Builds clean here.

Fixes #146.

Why: the registry handler rebinds m_waylandState.seat for every wl_seat
global, so a client ends up on whichever seat was advertised last. When a
compositor exposes extra seats (for example a plugin that adds seats for
background automation input), hyprtoolkit apps such as hyprland-dialog
attach their pointer and keyboard to that extra seat and never receive the
user's clicks or keys, so the ANR dialog cannot be dismissed.

How: ignore wl_seat globals once a seat is bound, so the first advertised
seat (the compositor's own) is used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vaxerski
vaxerski merged commit cbdaf51 into hyprwm:main Nov 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple wl_seat globals: hyprtoolkit binds the last seat, so hyprland-dialog ignores the real mouse

2 participants