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 }}
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
/// Called when the shell requests to close the window, for example because the user clicked
/// the little "X" in the titlebar.
///
/// If you want to actually close the window in response to this request, call
/// [`WindowHandle::close`]. If you don't implement this method, clicking the titlebar "X" will
/// have no effect.
fnrequest_close(&mutself){}
However, we don't report when the actual application is closing. This is most useful on macOS, as in other desktop environments (generally) the application is finished when the final window is closed1.
But for consistency, we should have the same API across all backends. This could be used for saving states, for example.
This would be slightly earlier than AppHandler::drop - the event loop might still be running at this point (?)
We have:
glazier/src/window.rs
Lines 773 to 779 in 618382a
However, we don't report when the actual application is closing. This is most useful on macOS, as in other desktop environments (generally) the application is finished when the final window is closed1.
But for consistency, we should have the same API across all backends. This could be used for saving states, for example.
This would be slightly earlier than
AppHandler::drop
- the event loop might still be running at this point (?)An implementation for macOS exists in 86f0494 (from lapce's fork)
An implementation note:
This should not be called upon calling Application::quit, for consistency with the Window methods.
AppHandler::drop
could possibly be used in that case?CC @waywardmonkeys, as discussed in Zulip.
Footnotes
Customising this behaviour could make sense - e.g. for close to tray on Windows (and Linux in theory, except that there's no tray) ↩
The text was updated successfully, but these errors were encountered: