-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving script from floating script window moves window focus back to the main editor window #78672
Comments
For me this also happens on scripts that aren't associated with a scene. |
I have tracked on Linux, where the Main Window gets brought to the foreground, when the "Saving Scene" popup appears:
Not sure, how to prevent this from happening. |
This happens for me on MacOS too. |
I can confirm on my windows machine this also occurs, and expanding this issue there is a stutter when using an undocked script and adding a breakpoint, after that when you press F10/F11 to scroll through your code, it stutters back to the main Godot window and instantly goes back to the script editor, which is also not expected behaviour. |
I read this and other issues about the problem.
I'll work on solution 1 in the following days. |
See #79261, which implements this functionality. |
Very nice, I'll build the solution for this issue on that PR. |
I personally just mapped 'save script' to Ctrl+S (by default it is 'Ctrl+Alt+S', but Ctrl+S seems to work as well, except it tries to save the main scene which triggers the change of focus). Then you get two actions mapped to Ctrl+S but Godot doesn't seem to mind. I just found that solution a couple days ago. Before that I just thought this floating script window feature was unusable with window managers. |
Godot version
master (3710f06)
System information
Godot v4.1.beta (3710f06) - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Sat, 10 Jun 2023 00:35:19 +0000 - Vulkan (Forward+) - dedicated AMD Radeon R9 380 Series (RADV TONGA) () - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)
Issue description
Using i3wm, tiling window manager.
If I'm in the floating script window and I hit Ctrl+S to save, the window focus gets switched to the main Godot window.
I'd expect it to stay on the script window instead.
Note: this happens only when the script is associated with a scene. A standalone script does not trigger the focus switch.
Steps to reproduce
Float script window, use ctrl+s to save, see focus returned to main godot editor window.
Following screencap of this exact sequence. I switch focus to the script window, type "pass" and press ctrl+s. and you can see the blue square around the windows showing current focus move back to the main window.
bug-demo.mp4
Minimal reproduction project
You only need a scene with a script attached.
The text was updated successfully, but these errors were encountered: