5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 19:50:15 +08:00

prevent close event being propagated when handled in app (#1297)

closes #1288
This commit is contained in:
Florent 2022-03-30 09:13:01 +02:00 committed by GitHub
parent 6883337a18
commit ec31d49b59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,7 +184,9 @@ extern void processURLRequest(void *request);
gboolean close_button_pressed(GtkWidget *widget, GdkEvent *event, void* data) gboolean close_button_pressed(GtkWidget *widget, GdkEvent *event, void* data)
{ {
processMessage("Q"); 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) { GtkWidget* setupWebview(void* contentManager, GtkWindow* window, int hideWindowOnClose) {