Carlos Garnacho 608d3019b6 x11: Ignore _NET_ACTIVE_WINDOW client messages while grabbed
When a X11 application is started, typically what happens is:

- A startup notification token is created, with a _TIME%d suffix
- The application being spawned receives it through the environment
- (dbus piping, maybe)
- The application replies the startup notification token, and
  fetches the timestamp from it
- The application makes a _NET_ACTIVE_WINDOW client message request
  with this timestamp
- Mutter handles this client request and activates/focuses the window

Prevent this last step if windows are not interactable (e.g. there is
a compositor grab) and ignore the focus request. This specifically
applies to X11 clients requesting focus themselves, and unlike previous
approaches, doesn't try to prevent focus changes that do come through
interaction with Mutter/GNOME Shell.

This should only break if applications do not observe _NET_ACTIVE_WINDOW
and perform XSetInputFocus on themselves, but in that case the X11
keyboard focus is stolen from our hands already.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2878>
2023-03-05 07:17:02 +00:00
..
2023-03-03 19:17:51 +00:00
2018-11-06 17:17:36 +01:00
2018-11-06 17:17:36 +01:00
2018-11-06 17:17:36 +01:00
2018-11-06 17:17:36 +01:00
2022-12-09 16:28:33 +00:00
2022-12-09 16:28:33 +00:00