From 23445b5246effe8782763ba1bf2c77839777385e Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Tue, 17 Feb 2026 17:10:21 +0100 Subject: [PATCH] protocol: define implicit pointer grab It was mentioned in a lot of places, but never defined, which has caused some divergent implementations over time. While an implicit pointer grab is active, some compositors don't allow pointer focus to switch between toplevel and popups, and some applications assume the grab also works on a subsurface level. This commit defines implicit pointer grabs to only lock pointer focus to the current surface tree, but not to any specific (sub)surface or popup. Signed-off-by: Xaver Hugl --- protocol/wayland.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 58e5649e..79ced51a 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -2189,6 +2189,13 @@ kernel's event code list. All other button codes above 0xFFFF are currently undefined but may be used in future versions of this protocol. + + When a button is pressed, an implicit pointer grab is started. + While the implicit grab is active, the compositor should keep pointer + focus on surfaces of the same surface tree, which consists of + subsurfaces and popups on the same root surface. + The implicit grab stops being active if either all buttons are released, + or some compositor-specific situations occurs (like screen locking).