TheAcharya / MarkerData

The avant-garde Marker extraction application crafted for Final Cut Pro
https://markerdata.theacharya.co
MIT License
22 stars 1 forks source link

`Red` close button should quit the application rather than "minimise" #97

Closed IAmVigneswaran closed 1 month ago

IAmVigneswaran commented 1 month ago

@milanvarady

red-close-button

Chris have some feedback -

Currently when you press the red close button in Marker Data, it just closes, the window, leaving the application in focus - but the menubar items (i.e. "About Marker Data") no longer work - because the window no longer exists.

Really, for a "single window" application, clicking the red close button should quit the application. In a "document based" application like TextEdit, it works differently, as you can create new windows from the menubar.

I think in the case of Marker Data, it makes most sense to quit the application when you close the window, given it's not a document-based app, and you only have a single window.

Chris shared a code snippet -

class AppDelegate: NSObject, NSApplicationDelegate {

//
// Application Should Terminate After Last Window Closed:
//
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
    return true
}
milanvarady commented 1 month ago

Done.