From 729b86ee2f77c45e21facd73122590bc483257f2 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 19 Oct 2021 05:58:27 +0300 Subject: [PATCH 20/20] gtk: Destroy toplevel window on quit See osdn #43072 Signed-off-by: Marko Lindqvist --- client/gui-gtk-2.0/gui_main.c | 1 + client/gui-gtk-3.0/gui_main.c | 1 + client/gui-gtk-3.22/gui_main.c | 1 + 3 files changed, 3 insertions(+) diff --git a/client/gui-gtk-2.0/gui_main.c b/client/gui-gtk-2.0/gui_main.c index 7e77f44b2c..b151c04a68 100644 --- a/client/gui-gtk-2.0/gui_main.c +++ b/client/gui-gtk-2.0/gui_main.c @@ -1701,6 +1701,7 @@ void ui_main(int argc, char **argv) cma_fe_done(); free_unit_table(); gtk_widget_destroy(toplevel_tabs); + gtk_widget_destroy(toplevel); message_buffer = NULL; /* Result of destruction of everything */ tileset_free_tiles(tileset); } diff --git a/client/gui-gtk-3.0/gui_main.c b/client/gui-gtk-3.0/gui_main.c index d172a91a58..494a347112 100644 --- a/client/gui-gtk-3.0/gui_main.c +++ b/client/gui-gtk-3.0/gui_main.c @@ -1843,6 +1843,7 @@ void ui_main(int argc, char **argv) free_unit_table(); editgui_free(); gtk_widget_destroy(toplevel_tabs); + gtk_widget_destroy(toplevel); message_buffer = NULL; /* Result of destruction of everything */ tileset_free_tiles(tileset); } diff --git a/client/gui-gtk-3.22/gui_main.c b/client/gui-gtk-3.22/gui_main.c index b7a00f75a6..3d723c3f4b 100644 --- a/client/gui-gtk-3.22/gui_main.c +++ b/client/gui-gtk-3.22/gui_main.c @@ -1930,6 +1930,7 @@ void ui_main(int argc, char **argv) free_unit_table(); editgui_free(); gtk_widget_destroy(toplevel_tabs); + gtk_widget_destroy(toplevel); message_buffer = NULL; /* Result of destruction of everything */ tileset_free_tiles(tileset); } -- 2.33.0