mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 13:22:15 +00:00
display: Do not move X11 input focus during grabs
On X11, the stage itself is backed by an XWindow, and moving the
input focus elsewhere will bypass any Clutter-level grabs.
This effectively allows newly opened windows to steal the focus
from gnome-shell itself, which is clearly undesirable. To prevent
that, only move the X11 focus when no grab is in place, just like
commit 50e89e376
did for the stage focus.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5932
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2776>
This commit is contained in:
parent
24f796a30c
commit
7531669b4f
@ -1553,7 +1553,9 @@ meta_display_set_input_focus (MetaDisplay *display,
|
||||
if (meta_display_timestamp_too_old (display, ×tamp))
|
||||
return;
|
||||
|
||||
if (display->x11_display)
|
||||
|
||||
if (display->x11_display &&
|
||||
meta_display_windows_are_interactable (display))
|
||||
{
|
||||
meta_x11_display_set_input_focus (display->x11_display, window,
|
||||
focus_frame, timestamp);
|
||||
|
Loading…
Reference in New Issue
Block a user