mirror of
https://github.com/brl/mutter.git
synced 2025-01-07 10:12:14 +00:00
x11: Update X11 focus before updating MetaDisplay focus
In a similar vein to commit8fd55fef85
. This notably failed when setting the focus on the stage (eg. to redirect key events to Clutter actors). Deeper in MetaDisplay focus updating machinery, it would check meta_stage_is_focused() which would still return FALSE at the time it's called. This would not typically have side effects, but our "App does not respond" dialogs see the focus change under their feet, so they try to bring themselves to focus again. This results in a feedback loop. Changing the order results in later checks on the X11 POV of the focus being correct, so focus is not mistakenly stolen from the close dialog, and it actually succeeds in keeping the key focus. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1607 https://gitlab.gnome.org/GNOME/mutter/merge_requests/876 (cherry picked from commit71c3f4af31
)
This commit is contained in:
parent
85f5db7e73
commit
ef2f5f07f0
@ -1928,10 +1928,10 @@ meta_x11_display_set_input_focus_xwindow (MetaX11Display *x11_display,
|
||||
{
|
||||
gulong serial;
|
||||
|
||||
meta_display_unset_input_focus (x11_display->display, timestamp);
|
||||
serial = XNextRequest (x11_display->xdisplay);
|
||||
meta_x11_display_set_input_focus_internal (x11_display, window, timestamp);
|
||||
meta_x11_display_update_focus_window (x11_display, window, serial, TRUE);
|
||||
meta_display_unset_input_focus (x11_display->display, timestamp);
|
||||
}
|
||||
|
||||
static MetaX11DisplayLogicalMonitorData *
|
||||
|
Loading…
Reference in New Issue
Block a user