-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Remember the editor window position and size across restarts #32056
Conversation
@@ -319,6 +319,8 @@ class EditorNode : public Node { | |||
PopupMenu *editor_layouts; | |||
EditorLayoutsDialog *layout_dialog; | |||
|
|||
Ref<ConfigFile> window_config; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since saving overrides everything regardless of previous values, I think it might not need to be a member variable, you can just instantiate a ConfigFile when loading, and another one when saving.
9c43c91
to
9680ad5
Compare
@Calinou How can this be moved from draft to mergable state? |
This needs to be redone from scratch for DisplayServer, and ideally made to use a |
Would this PR when done also remember the fullscreen mode of the editor? As this was mentioned in a proposal that got closed that asked for an option to remember the fullscreen mode. Seeing that this PR is still open, I'll instead mention here (rather than opening an issue) that I just spent 20 minutes fighting my editor getting glitched so that it always opened one specific project in fullscreen mode (when directly told to open that project rather than going through the project manager), which is not what I want.
In the end I edited my project file to define my game as not fullscreen and also deleted the .import folder again, this time by directly starting the godot editor and maximizing it before the import, and then I did exit to the project list and opening the project again for good measure. That somehow now fixed it so that when I directly load the project in Godot it just maximises the editor window how I want it. In summary, I had a very strange issue... So I'd very much like to see this PR be completed (and also remember the fullscreen mode) as that would have saved me the 30+ minutes I spent frustrated trying to get my Godot editor working again, and also the time I spent trying to find if this is already reported / there's a proposal. Edit: and I want to mention one more thing, the editor completely ignored the command line flags |
This PR doesn't remember fullscreen mode by design. Most other applications like web browsers don't remember their fullscreen mode from previous sessions. Games do, but they are an entirely separate realm 🙂 |
Would it be worth it then for me to try to report this as a bug? As I said I don't have steps to reproduce this problem, but this was very annoying and strange when it happened to me. |
Feel free to create a separate issue for it, but it sounds very strange to me – I've never seen anything of the sort. It's not guaranteed that anyone else will be able to reproduce it. |
We discussed this briefly in PR review meeting, this would be nice to have. Needs redoing for DisplayServer. Might also be good to support remember the monitor/screen index (and properly handling if the screen is no longer connected, then it should fall back again to what is configured in the editor settings). |
This is already done for some dialogs (somewhat), and is actually a reason for a bug, being fixed here: #61336 |
Superseded by #76085. |
Some notes:
The configuration accounts for multiple monitors and will save the window position relative to the current monitor. When reopening the editor, it will open on the monitor that's currently active.main.cpp
, but I don't know how this could be done since it needs to be done early enough while getting the file path from the EditorSettings singleton.This closes #5114.