-
Notifications
You must be signed in to change notification settings - Fork 1.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
Incorrect maximize behaviour #3494
Comments
probably related to #1517 Workaround: save the maximized state in you App struct and add a sentinel variable to indicate the first frame (not persisted, default false, set to true on the first frame). Then you can do: if self.first_frame {
self.first_frame = false;
frame.set_maximized(self.persisted_maximized_state);
} |
Fix coming in #3601 |
* Closes #3494 This makes sure it is always up-to-date. Previously (years back) this caused a deadlock on Mac, but this seems to have been fixed
Re-opened because of dead-lock: #3612 |
#3831 will fix this for Windows, but Linux and Mac still has the issue |
Hmm, even without the deadlock and with the Windows fix, I think bug 2 in the issue is not addressed. After closing a maximized window, this is what is saved:
There is no info about maximization saved, which means the window will never be maximized on startup automatically. (In fact, for me, it causes a maximized-sized window to appear halfway off-screen on the wrong monitor). The coordinates saved are also the ones of the maximized window. I think for consistent and nice behavior, the state should persist:
This way both the maximization state and even the size and position when un-maximizing the window are preserved, even across app restarts. Maybe it makes sense to split bug 2 out into its own issue, since it's more a feature request than a bug? |
Describe the bug
There are a few problem with maximizing a native window in
eframe
.eframe
provides aFrame
struct and inside it there is anIntegrationInfo
struct that you can retrieve with theinfo()
method. In the integration info, there is some data about the native window including a boolean that indicates if the window is maximized or not. this boolean doesn't change to true even if the window is maximized.NativeOptions
Ive noticed when I start up the app with maximized set to true it does start that way, but instantly shrinks to the previous session's dimensions and if it was closed while maximized it does try to do the dimensions of a maximized window but not actually maximized and it becomes slightly offset.To Reproduce
Steps to reproduce the behavior:
I dont know if it matters but here are my egui and eframe in my Cargo.toml
presist_window
to trueExpected behavior
When opening the window, if the
presist_window
is true and the window was maximized in the last session it should be maximized again in the same monitor.Also the
WindowInfo
struct in theFrame
provided by eframe should have maximized set to true if the window is maximized.Desktop:
The text was updated successfully, but these errors were encountered: