app: [macOS] use NSNotificationCenter to receive app events

Notifications don't require a list of windows nor an app delegate.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-12-11 15:00:58 -06:00
parent 9bca5bfdcf
commit d7528a8338
2 changed files with 15 additions and 20 deletions
-14
View File
@@ -851,20 +851,6 @@ func gio_onWindowed(view C.CFTypeRef) {
w.ProcessEvent(ConfigEvent{Config: w.config})
}
//export gio_onAppHide
func gio_onAppHide() {
for _, w := range viewMap {
w.setStage(StagePaused)
}
}
//export gio_onAppShow
func gio_onAppShow() {
for _, w := range viewMap {
w.setStage(StageRunning)
}
}
//export gio_onFinishLaunching
func gio_onFinishLaunching() {
close(launched)