Skip to content
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

Reopen the run-windows at the last known position #4900

Open
ngreve opened this issue Jul 17, 2022 · 5 comments
Open

Reopen the run-windows at the last known position #4900

ngreve opened this issue Jul 17, 2022 · 5 comments

Comments

@ngreve
Copy link

ngreve commented Jul 17, 2022

Describe the project you are working on

Godot Games

Describe the problem or limitation you are having in your project

Many developers do work with some sort of multi monitor setup, including me.
The setup and workflow is mostly as the following:

  • When working with Godot, the editor is usually running in full screen on one monitor. At some point you want to test what you've put together so you it the run-button.
  • The game window opens on top of the editor in the middle of the screen.
  • You find something in your game that does not work as expected and you move the game window onto your second screen.
  • You change some things in your game, watching the run-window on your seconds screen. At some point you hit the (re)run-button.
  • The run window opens in the middle of the screen again.

I explained it with the most useful desktop setup, but this improvement would also be very useful when working with 1 monitor.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

When hitting the (re)run button, the game window should reopen at the position it was put before.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

godot-proposal

This could either be the default option, or this could be defined in the Window Placement editor options:
godot-proposal-editor-settings

If this enhancement will not be used often, can it be worked around with a few lines of script?

I don't think so (?)

Is there a reason why this should be core and not an add-on in the asset library?

Not an engine developer, but to me it just makes sense and would be overkill for this seemingly simple feature/improvement.
("Simple" for someone who knows the code base enough)

@Calinou
Copy link
Member

Calinou commented Jul 17, 2022

Note that the window size should also be remembered across runs in this case. Otherwise, the window could end up outside the screen bounds if you move a small window to the bottom-right corner of the screen.

Unfortunately, this caveat can also make the feature confusing: changes to Test Width/Test Height will not apply anymore to your project if you've run the project at least once before.

It's possible to remember only the window position (and try to move the window if it would end up outside the screen bounds), but people working on non-game applications may not be satisfied with this 🙂

@ngreve
Copy link
Author

ngreve commented Jul 18, 2022

Wouldn't it be possible to recycle an already existing run window?
By not closing the old run window and not creating a new one, but rather reuse the existing one?
Just a thought, I do not know how the windowing system works under the hood.

@Calinou
Copy link
Member

Calinou commented Jul 18, 2022

Wouldn't it be possible to recycle an already existing run window?
By not closing the old run window and not creating a new one, but rather reuse the existing one?

Restarting the project will kill the existing process and spawn a new one, so this isn't possible.

@DanielNautre
Copy link

Unfortunately, this caveat can also make the feature confusing: changes to Test Width/Test Height will not apply anymore to your project if you've run the project at least once before.

Woudn't that (change to test height/width) constitute an acceptable case to reset the position/size of the run window ?

@sosasees
Copy link

yes, i think it would, because i change the Test Size only a few times at the beginning of development of a new project and then don't change it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants