From ec31d49b5961e65622298650e674da085e3f7f5b Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 30 Mar 2022 09:13:01 +0200 Subject: [PATCH] prevent close event being propagated when handled in app (#1297) closes #1288 --- v2/internal/frontend/desktop/linux/window.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2/internal/frontend/desktop/linux/window.go b/v2/internal/frontend/desktop/linux/window.go index aabe5a65d..e2e212063 100644 --- a/v2/internal/frontend/desktop/linux/window.go +++ b/v2/internal/frontend/desktop/linux/window.go @@ -184,7 +184,9 @@ extern void processURLRequest(void *request); gboolean close_button_pressed(GtkWidget *widget, GdkEvent *event, void* data) { processMessage("Q"); - return FALSE; + // since we handle the close in processMessage tell GTK to not invoke additional handlers - see: + // https://docs.gtk.org/gtk3/signal.Widget.delete-event.html + return TRUE; } GtkWidget* setupWebview(void* contentManager, GtkWindow* window, int hideWindowOnClose) {