You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Need to get info about window state (maybe only on Windows) #208
Need to add possibility emit Maximized and Minimized window events to winit.
Current implementation on window minimizing only sends Resized event, where window size on Windows machines equals to zero (w = 0, h = 0). Sometimes it causes bugs in programs (like games), where aspect ratio dynamically calculated on window size change.
There are two suggestions to implement:
Add completely new window events - WindowEvent::Minimized and WindowEvent::Maximized, as the result of window minimization don't send WindowEvent::Resized, only that two new
Update current WindowEvent::Resized(u32, u32) signature to a new WindowEvent::Resized(u32, u32, bool) one, where bool parameter will be a window minized (true)/maximized (false) state
changed the title [-]Need to get info about window state (maybe only Windows)[/-][+]Need to get info about window state (maybe only on Windows)[/+]on Jun 25, 2017
I'd add that it would be nice to be able to query Window::get_maximized, although the same thing can be accomplished via the proposed WindowEvent::Maximized event - receiving Maximized implies that the window is, well, maximized, and any further resizes mean that it's not.
Also, does this need to be Windows specific? I imagine that most WMs provide something similar, although IIRC on OS X, "Maximized" and "fullscreen" often mean the same thing.
We would love to have either a WindowEvent::Maximized or a Window::get_maximized so we can now the current state of the window as we persist the window state for the next time the app is started, and can't currently persist if the window was maximised or not.
FTR, an Event::Maximized would be pretty simple to do on wayland. Event::Minimized would be trickier as it's not explicitly advertised by the display server.
I'd definitely be alright with having this. It should be fine to have both a get_maximized method and a WindowEvent::Maximized event, since there are distinct uses for both.
We already keep track of this information internally on the Windows backend, so exposing this should be trivial there.
Activity
[-]Need to get info about window state (maybe only Windows)[/-][+]Need to get info about window state (maybe only on Windows)[/+]zrneely commentedon Mar 24, 2019
I'd add that it would be nice to be able to query
Window::get_maximized, although the same thing can be accomplished via the proposedWindowEvent::Maximizedevent - receivingMaximizedimplies that the window is, well, maximized, and any further resizes mean that it's not.Also, does this need to be Windows specific? I imagine that most WMs provide something similar, although IIRC on OS X, "Maximized" and "fullscreen" often mean the same thing.
repi commentedon Mar 25, 2019
We would love to have either a
WindowEvent::Maximizedor aWindow::get_maximizedso we can now the current state of the window as we persist the window state for the next time the app is started, and can't currently persist if the window was maximised or not.elinorbgr commentedon Apr 25, 2019
FTR, an
Event::Maximizedwould be pretty simple to do on wayland.Event::Minimizedwould be trickier as it's not explicitly advertised by the display server.Osspial commentedon Sep 19, 2019
I'd definitely be alright with having this. It should be fine to have both a
get_maximizedmethod and aWindowEvent::Maximizedevent, since there are distinct uses for both.We already keep track of this information internally on the Windows backend, so exposing this should be trivial there.
Fix minimize on Windows
Fix minimize on Windows (#19)
Fix a bug on Windows where minimizing adjusts all of the egui window …
Fix a bug on Windows where minimizing adjusts all of the egui window …
Fix a bug on Windows where minimizing adjusts all of the egui window …