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

Main window position is not saved on multi-monitor systems #16

Closed
MichaelKv opened this issue Apr 28, 2021 · 4 comments
Closed

Main window position is not saved on multi-monitor systems #16

MichaelKv opened this issue Apr 28, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@MichaelKv
Copy link

Hello. I use ImGuiConfigFlags_ViewportsEnable setting and hello_imgui_demo_classic.exe does not save the main window position and its size on milti-monitor system.

@pthom
Copy link
Owner

pthom commented Apr 29, 2021

Hello,

Can you clarify what you mean by "main window" ?

If by "main window", you mean the native window created by the backend (be it SDL, Glfw, or Qt); IMHO imgui in itself (and thus hello_imgui) does not provide any way to remember/restore this as a setting (since this window is created be the backnd long before imgui is inited).

See this answer from the imgui author. This was in 2019, but I suspect this is still valid.

@MichaelKv
Copy link
Author

I mean native Windows window. I consider hello_imgui as a windows management system so I believe it shall be responsible for saving/restoring all windows sizes, positions etc. though customers could do such a job themselves indeed.

@pthom
Copy link
Owner

pthom commented May 6, 2021

I understand the need. May be this would be a nice thing to implement, although it needs some more thinking (i.e how to store this in imgui.ini, how to handle the different backends).
I keep this issue opened so that the idea stays prominent.

@pthom pthom added the enhancement New feature or request label May 6, 2021
@pthom
Copy link
Owner

pthom commented Nov 20, 2022

Hi,

Window position can be saved in the latest version. Autosize is also available.

See: https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/hello_imgui_api.md#application-window-params

@pthom pthom closed this as completed Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants