diff -r 03599608d555 -r 8be7fd628fbc ui/gtk/window.c --- a/ui/gtk/window.c Fri Nov 15 21:16:18 2024 +0100 +++ b/ui/gtk/window.c Fri Nov 15 21:23:16 2024 +0100 @@ -80,7 +80,11 @@ uic_context_prepare_close(obj->ctx); obj->ref--; if(obj->ref > 0) { +#if GTK_CHECK_VERSION(2, 18, 0) + gtk_widget_set_visible(obj->widget, FALSE); +#else gtk_widget_hide(obj->widget); +#endif return TRUE; } else { return FALSE; @@ -100,7 +104,7 @@ static UiObject* create_window(const char *title, void *window_data, UiBool simple) { CxMempool *mp = cxBasicMempoolCreate(256); UiObject *obj = cxCalloc(mp->allocator, 1, sizeof(UiObject)); - obj->ref = 1; + obj->ref = 0; #ifdef UI_LIBADWAITA obj->widget = adw_application_window_new(ui_get_application());