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

Events for when window is maximized/minimized #1578

Open
sunjay opened this issue May 13, 2020 · 3 comments
Open

Events for when window is maximized/minimized #1578

sunjay opened this issue May 13, 2020 · 3 comments
Labels
C - needs discussion Direction must be ironed out S - api Design and usability

Comments

@sunjay
Copy link

sunjay commented May 13, 2020

There is currently no WindowEvent for when a user clicks the maximized/minimized buttons. It would be great if some could be added since there is currently no way to detect that otherwise. You can set the maximized state using set_maximized, but you have no way of knowing when the user does that themselves. You could probably hack around it using the Resized event or something, but I think it makes more sense for that to have its own variant in the WindowEvent enum.

I'm not sure if something similar makes sense for the window fullscreen state, but an event should be added for that too if it is possible for the user to change that themselves.

@kchibisov kchibisov transferred this issue from rust-windowing/glutin May 24, 2020
@kchibisov kchibisov added C - needs discussion Direction must be ironed out S - api Design and usability labels May 24, 2020
@kchibisov
Copy link
Member

moving to winit, since it's something it should do, if it'll be accepted.

@repi
Copy link
Contributor

repi commented Jun 9, 2020

We would want this as well, to be able to persist a setting that the app window was maximized so we can start up with that state

@rhysd
Copy link
Contributor

rhysd commented Oct 30, 2023

I want Minimized event and Restored event for my practical use case.

I'm using WebView2 for my application and WebView2 provides a way to reduce memory consumption on inactive state.

To determine when application goes inactive and when application goes back to active state, I need to receive the events. When Minimized is received, I can determine the application is inactive and when Restored is received, I can determine the application is back to active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs discussion Direction must be ironed out S - api Design and usability
Development

No branches or pull requests

4 participants