Skip to content

wayland: bind only the first wl_seat - #145

Closed
andyhennie wants to merge 1 commit into
hyprwm:mainfrom
andyhennie:fix/bind-first-seat
Closed

andyhennie wants to merge 1 commit into
hyprwm:mainfrom
andyhennie:fix/bind-first-seat

Conversation

@andyhennie

@andyhennie andyhennie commented Nov 3, 2026 •

Copy link
Copy Markdown

Problem

CWaylandPlatform's registry handler rebinds m_waylandState.seat for every wl_seat global, releasing the previous one. When a compositor advertises more than one seat, a hyprtoolkit app ends up on whichever seat came last.

I hit this with a Hyprland plugin that adds two extra seats for background automation input. hyprland-dialog (and so Hyprland's "Application Not Responding" dialog) attached its pointer and keyboard to the last of those extra seats. Clicks from the real mouse on the compositor's own seat never reached it, so Terminate/Wait did nothing and the dialog could not be dismissed.

WAYLAND_DEBUG=1 hyprland-dialog ... on that session, before:

wl_registry#2.bind(1, "wl_seat", 9, ...#4)
wl_registry#2.bind(69, "wl_seat", 9, ...#19)
-> wl_seat#4.release()
wl_registry#2.bind(70, "wl_seat", 9, ...#20)
-> wl_seat#19.release()
wl_seat#20.name("<extra seat 2>")
-> wl_seat#20.get_pointer(...)

After this change:

wl_seat#4.name("Hyprland")
-> wl_seat#4.get_pointer(...)

Fix

Ignore further wl_seat globals once a seat is bound, so the first advertised seat (the compositor's own) is used. No change for single-seat setups.

Tested on Hyprland 0.56.2 with hyprland-guiutils 0.2.2, loading this build through LD_LIBRARY_PATH on the multi-seat session: the dialog now binds the compositor's seat (log above). The change only skips seats after the first, so a single-seat session binds the same seat as before.

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Hi @andyhennie,

Thanks for your contribution! Unfortunately, Hyprland and hypr* no longer
accept contributions from unvouched contributors.

To get vouched, please see our contributing guide at wiki.hypr.land/Contributing-and-Debugging

This PR has been closed automatically and will not be re-opened.

@UncleJ4ck

UncleJ4ck commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the diagnosis and the fix. This was closed by the autocloser because the account isn't vouched, so I reopened it as #159 with your commit and authorship preserved. Credit is yours.

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.

2 participants