diff -r b8277deb75b8 -r 4cb216085479 ui/gtk/toolkit.c --- a/ui/gtk/toolkit.c Wed Nov 27 18:46:45 2024 +0100 +++ b/ui/gtk/toolkit.c Wed Nov 27 18:54:00 2024 +0100 @@ -158,13 +158,18 @@ #endif void ui_show(UiObject *obj) { + gboolean visible = gtk_widget_is_visible(obj->widget); + uic_check_group_widgets(obj->ctx); #if GTK_MAJOR_VERSION >= 4 gtk_window_present(GTK_WINDOW(obj->widget)); #elif GTK_MAJOR_VERSION <= 3 gtk_widget_show_all(obj->widget); #endif - obj->ref++; + + if(!visible) { + obj->ref++; + } } void ui_close(UiObject *obj) {