Merge pull request #72101 from bruvzg/x11_ime_unfocus

[X11] Fix IME focus return.
This commit is contained in:
Rémi Verschelde 2023-01-26 09:53:05 +01:00
commit cc7aa72f01
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1610,7 +1610,7 @@ void DisplayServerX11::window_set_transient(WindowID p_window, WindowID p_parent
// a subwindow and its parent are both destroyed.
if (!wd_window.no_focus && !wd_window.is_popup && wd_window.focused) {
if ((xwa.map_state == IsViewable) && !wd_parent.no_focus && !wd_window.is_popup) {
XSetInputFocus(x11_display, wd_parent.x11_window, RevertToPointerRoot, CurrentTime);
XSetInputFocus(x11_display, wd_parent.x11_window, RevertToParent, CurrentTime);
}
}
} else {