From a60b198b0385ce58f2c4801ba0bbf913a2452602 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 11 Feb 2024 08:58:00 +1100 Subject: [PATCH] Fix window close issues --- v3/pkg/application/linux_cgo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v3/pkg/application/linux_cgo.go b/v3/pkg/application/linux_cgo.go index af58cd4f7..7bf4362df 100644 --- a/v3/pkg/application/linux_cgo.go +++ b/v3/pkg/application/linux_cgo.go @@ -667,7 +667,7 @@ func widgetSetVisible(widget pointer, hidden bool) { } func (w *linuxWebviewWindow) close() { - C.gtk_window_close((*C.GtkWindow)(w.window)) + C.gtk_widget_destroy(w.gtkWidget()) getNativeApplication().unregisterWindow(windowPointer(w.window)) } @@ -1001,7 +1001,7 @@ func emit(we *C.WindowEvent) { //export handleDeleteEvent func handleDeleteEvent(widget *C.GtkWidget, event *C.GdkEvent, data C.uintptr_t) C.gboolean { processWindowEvent(C.uint(data), C.uint(events.Linux.WindowDeleteEvent)) - return C.gboolean(0) + return C.gboolean(1) } //export handleLoadChanged