Youda008 / DoomRunner

Preset-oriented graphical launcher of various ported Doom engines (an alternative to ZDL)
GNU General Public License v3.0
203 stars 13 forks source link

[suggestion] Remembering window size, arrangement and position #143

Open mstempell opened 5 months ago

mstempell commented 5 months ago

Would be great if the program remembered its window size, position, and arrangement (related to another suggestion I got), when closed and reopened.

Youda008 commented 5 months ago

But this is already there for a long time. What's your operating system?

mstempell commented 5 months ago

It's: Windows 10 Pro / Version 22H2 / Build 19045.3930 / Windows Feature Experience Pack 1000.19053.1000.0

And testing some more after your answer, window size is actually remembered, yes. So sorry for mentioning that.

Then it's just that the window pops up on the upper left, not where it was when closed. And if closed maximized, it's not exactly maximized when reopened.

Youda008 commented 5 months ago

In the past there was an issue with secondary monitors, where if you closed the app on an secondary monitor, then disconnected the monitor (laptop and external monitor) and open the app again, the window would not be visible and movable, because it would appear at virtual coordinates that no longer exist. That's why i have to re-center the window everytime. If i find a workaround, it can be removed.

mstempell commented 5 months ago

OK, that's indeed a serious problem you describe, that needed a solution.

If it cannot be an universal behavior, maybe there could a preference option to switch that re-centering off? (with a mention like "behavior not guaranteed with secondary monitor setup, delete preference file if the program window cannot be seen"?)

Or maybe the screen configuration can be known and recorded when closing, so that if different when the program is reopen, only then it then re-centers?

Youda008 commented 4 months ago

I found a way to detect if the last known screen coordinates are still valid, so i think it's now working correctly. It will be part of 1.8.3 release.