fyne icon indicating copy to clipboard operation
fyne copied to clipboard

Capability to intercept Quit from Menu/Dock for Mac

Open kvishal7 opened this issue 6 months ago • 13 comments

Checklist

  • [X] I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • [X] This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

I am working on a cross-platform backup application where it is required to save some context when the application is quit. In case of Windows/Linux it works well since there app can be quit only from the system tray / linux top bar respectively using the fyne menus. But for Mac, there is a 'Quit' option in the main menu of the app as well as on right clicking the app icon in the dock which can't be intercepted using the existing APIs.

Is it possible to construct a solution with the existing API?

I have tried but couldn't find anything relevant.

Describe the solution you'd like to see.

Being a cross-platform framework, it would be favorable to have a generic quit intercept API for the application using which we can define the quit action for all possible ways: fyne menu (All platforms), OS menu and dock (Mac).

kvishal7 avatar Aug 09 '24 11:08 kvishal7