mirror of
https://gitee.com/energye/energy.git
synced 2024-11-30 18:57:39 +08:00
upgrade: beta fix: macosx close bug
This commit is contained in:
parent
6322108bc0
commit
394465629c
@ -474,26 +474,18 @@ func (m *BaseWindow) registerDefaultChromiumCloseEvent() {
|
||||
m.chromium.SetOnClose(func(sender lcl.IObject, browser *ICefBrowser, aAction *TCefCloseBrowsesAction) {
|
||||
logger.Debug("chromium.onClose")
|
||||
if IsDarwin() { //MacOSX
|
||||
*aAction = CbaClose
|
||||
desChildWind := m.windowParent.DestroyChildWindow()
|
||||
logger.Debug("chromium.onClose => windowParent.DestroyChildWindow:", desChildWind)
|
||||
} else { // Window and Linux
|
||||
//QueueAsyncCall(func(id int) { //main thread run
|
||||
// m.windowParent.Free()
|
||||
// logger.Debug("chromium.onClose => windowParent.Free")
|
||||
//})
|
||||
} else if IsLinux() {
|
||||
*aAction = CbaClose
|
||||
} else if IsWindows() {
|
||||
*aAction = CbaDelay
|
||||
}
|
||||
QueueAsyncCall(func(id int) { //main thread run
|
||||
m.windowParent.Free()
|
||||
logger.Debug("chromium.onClose => windowParent.Free")
|
||||
})
|
||||
*aAction = CbaClose
|
||||
//if IsLinux() {
|
||||
// //继续关闭 -> OnBeforeClose
|
||||
// *aAction = CbaClose
|
||||
//} else {
|
||||
// //暂时停止关闭 -> OnBeforeClose
|
||||
// *aAction = CbaDelay
|
||||
//}
|
||||
if bwEvent.onClose != nil {
|
||||
bwEvent.onClose(sender, browser, aAction)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user