Repository: godotengine/godot (language: cpp)

Issue:
Floating game window doesn't get focus when launched
### Tested versions

Godot v4.4.beta2

### System information

Fedora Linux 41 (KDE Plasma) on Wayland - X11 display driver, Multi-window

### Issue description

Floating game window doesn't get focus when launched. 
The editor behind still has focus so if you have script open you will accidentally edit the script.

https://github.com/user-attachments/assets/5b4bea64-89b8-4f38-954b-770208a80159

In 4.4.beta1 the game window has focus correctly first time you launch it, but after that it behaves same as beta2

### Steps to reproduce

Have script open 
Launch scene
Press some buttons
Switch back to the script and see that you have typed in the script

### Minimal reproduction project (MRP)

N/A


Discussion / hints:

Fix patch:
diff --git a/editor/plugins/game_view_plugin.cpp b/editor/plugins/game_view_plugin.cpp
index d96ee851374e..6cc54ab34c97 100644
--- a/editor/plugins/game_view_plugin.cpp
+++ b/editor/plugins/game_view_plugin.cpp
@@ -230,6 +230,8 @@ void GameView::_instance_starting(int p_idx, List<String> &r_arguments) {
 		window_wrapper->set_window_title(appname);
 
 		_show_update_window_wrapper();
+
+		embedded_process->grab_focus();
 	}
 
 	_update_arguments_for_instance(p_idx, r_arguments);


Test patch: