From d342faed78e48f4f3b123385d07bf5b8fbf94be4 Mon Sep 17 00:00:00 2001 From: Andy Hennie Date: Tue, 3 Nov 2026 12:41:24 +0100 Subject: [PATCH] wayland: bind only the first wl_seat 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 --- src/core/platforms/WaylandPlatform.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/platforms/WaylandPlatform.cpp b/src/core/platforms/WaylandPlatform.cpp index e93ec47..6a1fcd5 100644 --- a/src/core/platforms/WaylandPlatform.cpp +++ b/src/core/platforms/WaylandPlatform.cpp @@ -56,7 +56,9 @@ bool CWaylandPlatform::attempt() { const std::string NAME = name; - if (NAME == "wl_seat") { + if (NAME == "wl_seat" && !m_waylandState.seat) { + // Bind only the first seat. Rebinding on every wl_seat global would leave us on + // whichever seat the compositor advertised last, which may not carry the user's input. TRACE(g_logger->log(HT_LOG_TRACE, " > binding to global: {} (version {}) with id {}", name, 9, id)); m_waylandState.seat = makeShared((wl_proxy*)wl_registry_bind((wl_registry*)m_waylandState.registry->resource(), id, &wl_seat_interface, 9)); initSeat();