Replies: 1 comment
-
What do you think should happen if hide on close is set? Do you think it should trigger anyway? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Proposal
Name: OnCloseBefore or OnBeforeClose
Type: func(ctx context.Context) (prevent bool)
This callback is Called when the window close button is pressed, just before the application close. It provides the application context and if the return value is true , ignores the close event and does not close the application.
Why
If we can control the close event fires or not
"There is work in progress. Are you sure you want to quit?" or "Are you sure you want to exit?" UX scenarios that prevent user mistakes, such as popping up a dialog like this, become possible.
Example
Beta Was this translation helpful? Give feedback.
All reactions