mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #113300 from LanzaSchneider/fix-focus-grab-warning-macos
MacOS: Fix focus grab warning on macOS when running game in embedded mode.
This commit is contained in:
commit
c7ae694d6b
1 changed files with 7 additions and 2 deletions
|
|
@ -358,7 +358,9 @@ void GameView::_instance_starting(int p_idx, List<String> &r_arguments) {
|
||||||
|
|
||||||
_show_update_window_wrapper();
|
_show_update_window_wrapper();
|
||||||
|
|
||||||
embedded_process->grab_focus();
|
if (embedded_process->get_focus_mode_with_override() != FOCUS_NONE) {
|
||||||
|
embedded_process->grab_focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_update_arguments_for_instance(p_idx, r_arguments);
|
_update_arguments_for_instance(p_idx, r_arguments);
|
||||||
|
|
@ -445,7 +447,10 @@ void GameView::_play_pressed() {
|
||||||
EditorNode::get_singleton()->get_editor_main_screen()->select(EditorMainScreen::EDITOR_GAME);
|
EditorNode::get_singleton()->get_editor_main_screen()->select(EditorMainScreen::EDITOR_GAME);
|
||||||
// Reset the normal size of the bottom panel when fully expanded.
|
// Reset the normal size of the bottom panel when fully expanded.
|
||||||
EditorNode::get_singleton()->get_bottom_panel()->set_expanded(false);
|
EditorNode::get_singleton()->get_bottom_panel()->set_expanded(false);
|
||||||
embedded_process->grab_focus();
|
|
||||||
|
if (embedded_process->get_focus_mode_with_override() != FOCUS_NONE) {
|
||||||
|
embedded_process->grab_focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
embedded_process->embed_process(current_process_id);
|
embedded_process->embed_process(current_process_id);
|
||||||
_update_ui();
|
_update_ui();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue