From 70da06cf673721336a3087660efda3a4c8ad4470 Mon Sep 17 00:00:00 2001 From: yanghy Date: Fri, 9 Dec 2022 21:51:11 +0800 Subject: [PATCH] upgrade: beta fix: macosx close bug --- cef/cef-application.go | 9 ++------- cef/cef-proc-def.go | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/cef/cef-application.go b/cef/cef-application.go index 70e61c2c..020de961 100644 --- a/cef/cef-application.go +++ b/cef/cef-application.go @@ -28,13 +28,8 @@ func NewApplication(cfg *tCefApplicationConfig) *TCEFApplication { } cfg.framework() result := new(TCEFApplication) - if Args.IsMain() { - r1, _, _ := Proc(internale_CEFApplication_Create).Call(uintptr(unsafe.Pointer(cfg))) - result.instance = unsafe.Pointer(r1) - } else { - r1, _, _ := Proc(internale_CEFApplicationSub_Create).Call(uintptr(unsafe.Pointer(cfg))) - result.instance = unsafe.Pointer(r1) - } + r1, _, _ := Proc(internale_CEFApplication_Create).Call(uintptr(unsafe.Pointer(cfg))) + result.instance = unsafe.Pointer(r1) //register default function result.defaultSetOnContextCreated() result.defaultSetOnProcessMessageReceived() diff --git a/cef/cef-proc-def.go b/cef/cef-proc-def.go index b9077b6f..5226bdde 100644 --- a/cef/cef-proc-def.go +++ b/cef/cef-proc-def.go @@ -32,7 +32,6 @@ func init() { dllimports.NewEnergyImport("AddCustomCommandLine", 0), //application dllimports.NewEnergyImport("CEFApplication_Create", 0), - dllimports.NewEnergyImport("CEFApplicationSub_Create", 0), dllimports.NewEnergyImport("CEFApplication_Destroy", 0), dllimports.NewEnergyImport("CEFApplication_Free", 0), dllimports.NewEnergyImport("CEFApplication_StopScheduler", 0), @@ -363,7 +362,6 @@ const ( internale_AddCustomCommandLine //application internale_CEFApplication_Create - internale_CEFApplicationSub_Create internale_CEFApplication_Destroy internale_CEFApplication_Free internale_CEFApplication_StopScheduler