asticode/go-astilectron

close event not work on mac 10.15.1

Closed this issue · 0 comments

hello @asticode! close event work on windows 10,but not on mac 10.15.1.
how to do it?

//EventNameWindowEventMinimize work
Window.On(astilectron.EventNameWindowEventMinimize, func(e astilectron.Event) (deleteListener bool) {
		fmt.Println("EventNameWindowEventMinimize----------->>>>>>>>>>>>")
		return false
	})

////log
2020/02/26 13:46:01 Astilectron says: {"name":"window.event.minimize","targetID":"1"}
EventNameWindowEventMinimize----------->>>>>>>>>>>>

//close window not work 
Window.On(astilectron.EventNameWindowEventClosed, func(e astilectron.Event) (deleteListener bool) {
		fmt.Println("EventNameWindowEventClosed----------->>>>>>>>>>>>")
		return false
	})
	Window.On(astilectron.EventNameWindowCmdClose, func(e astilectron.Event) (deleteListener bool) {
		fmt.Println("EventNameWindowCmdClose----------->>>>>>>>>>>>")
		return false
	})
	Window.On(astilectron.EventNameAppClose, func(e astilectron.Event) (deleteListener bool) {
		fmt.Println("EventNameAppClose----------->>>>>>>>>>>>")
		return false
	})
	Window.On(astilectron.EventNameAppCmdQuit, func(e astilectron.Event) (deleteListener bool) {
		fmt.Println("EventNameAppCmdQuit----------->>>>>>>>>>>>")
		return false
	})
	Window.On(astilectron.EventNameAppCrash, func(e astilectron.Event) (deleteListener bool) {
		fmt.Println("EventNameAppCrash----------->>>>>>>>>>>>")
		return false
	})
//log
2020/02/26 13:46:21 Astilectron says: {"name":"app.cmd.quit","targetID":"app"}
2020/02/26 13:46:21 Stopping...
2020/02/26 13:46:21 astikit: stopping worker...
2020/02/26 13:46:21 Closing...