File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1014,9 +1014,6 @@ void PopupMenu::_notification(int p_what) {
10141014 float pm_delay = pm->get_submenu_popup_delay ();
10151015 set_submenu_popup_delay (pm_delay);
10161016 }
1017- if (!is_embedded ()) {
1018- set_flag (FLAG_NO_FOCUS, true );
1019- }
10201017 if (system_menu_id != NativeMenu::INVALID_MENU_ID) {
10211018 bind_global_menu ();
10221019 }
@@ -2829,6 +2826,8 @@ void PopupMenu::popup(const Rect2i &p_bounds) {
28292826 if (native) {
28302827 NativeMenu::get_singleton ()->popup (global_menu, (p_bounds != Rect2i ()) ? p_bounds.position : get_position ());
28312828 } else {
2829+ set_flag (FLAG_NO_FOCUS, !is_embedded ());
2830+
28322831 moved = Vector2 ();
28332832 popup_time_msec = OS::get_singleton ()->get_ticks_msec ();
28342833 if (!is_embedded ()) {
@@ -2856,6 +2855,8 @@ void PopupMenu::set_visible(bool p_visible) {
28562855 NativeMenu::get_singleton ()->popup (global_menu, get_position ());
28572856 }
28582857 } else {
2858+ set_flag (FLAG_NO_FOCUS, !is_embedded ());
2859+
28592860 Popup::set_visible (p_visible);
28602861 }
28612862}
You can’t perform that action at this time.
0 commit comments