diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 11:00:55 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 11:00:55 +0100 |
commit | e044b56ccf3057bf56b1995fca9c21607b0e7ffc (patch) | |
tree | 29af8249bf1fa25f033ece8f090a0350f9f76bc1 | |
parent | afe3b94ab28a28d562fd96f3daf41a22cb26757a (diff) | |
parent | 9f426498231816ccb9d686b3944373f61312aa24 (diff) |
Merge pull request #72497 from bruvzg/x11_ime_popup_focus
[X11] Fix IME subwindow in the popup not getting input focus.
-rw-r--r-- | platform/linuxbsd/x11/display_server_x11.cpp | 2 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index c09da2f7b3..1c4b8ffc9f 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -4897,7 +4897,7 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, V // handling decorations and placement. // On the other hand, focus changes need to be handled manually when this is set. // - save_under is a hint for the WM to keep the content of windows behind to avoid repaint. - if (wd.is_popup || wd.no_focus) { + if (wd.no_focus) { windowAttributes.override_redirect = True; windowAttributes.save_under = True; valuemask |= CWOverrideRedirect | CWSaveUnder; diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index ddc11d97b9..0eeac2f285 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -840,6 +840,9 @@ void PopupMenu::_notification(int p_what) { float pm_delay = pm->get_submenu_popup_delay(); set_submenu_popup_delay(pm_delay); } + if (!is_embedded()) { + set_flag(FLAG_NO_FOCUS, true); + } } break; case NOTIFICATION_THEME_CHANGED: |