-
-
Notifications
You must be signed in to change notification settings - Fork 477
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
Meaning of Event::Closed not clear #520
Comments
The event is reported after the window has been closed. |
So, in my opinion that would be beneficial feature like it is possible in e.g. GLFW. |
Relevant to this, here is something I found while testing stuff under OSX. There it works as an actual ShouldClose event, so clicking the close button doesn't actually close the window and you have to break the event loop manually. But on Linux it unconditionally closes the window. Clearly there is an inconsistency here, and imho it should just send the close event but don't destroy the window, so you get a chance to display those "save? yes/no/cancel" dialogs. Gtk can do it under linux, so it should be possible. |
Closing for rust-windowing/winit#46 |
As far as I understood the Event::Closed event is fired when the user attempts to close the window (e.g. presses the Close (x) button of the window). At least thats the behaviour during my testing under X11.
The docs (and the name) meanwhile give the impression that the event actually is fired after the window really has been closed.
If the window should be closed directly, what is the way to catch
ShouldClose
like events?The text was updated successfully, but these errors were encountered: