Skip to content

Slack off “xwayland-allow-grabs” setting

Olivier Fourdan requested to merge ofourdan/mutter:issue597 into master

To emulate X11 grabs, mutter as a Wayland compositor would disable its own keyboard shortcuts and when the X11 window is an override redirect window (which never receives focus), it also forces keyboard focus onto that X11 O-R window so that all keyboard events are routed to the window, just like an X11 server would.

But that's a bit of a “all-or-nothing” approach which prevents applications that would legitimately grab the keyboard under X11 (like virtual machine viewers) to work by default.

@jwrdegoede suggested (in a private email thread) to decorrelate the two behaviours, so that we could enable X11 grabs in mutter on Wayland by default (so that !569 (closed) would be sufficient to have working grabs in Xwayland) but still not allow for the keyboard focus locks with O-R window which would become a separate option kept disabled by default.

The following Merge request is to implement @jwrdegoede's suggestion and let people discuss its acceptability.

Change “xwayland-allow-grabs” to control whether the keyboard focus should be locked onto override redirect windows in case of an X11 grab.

For stringent needs, careful users can still use the blacklisting feature (i.e. a list containing “!*”) to prevent grabs from any X11 applications to affect other Wayland native applications.

Edited by Jonas Ådahl

Merge request reports