From 5891b764cb59e0619526d451a475f1d8ae64e109 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 21 May 2016 22:36:21 -0400 Subject: [PATCH] Forgot to take a reference on GtkWindows; this led to weird GObject warnings on the command line when closing a window. Update #40. --- unix/window.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unix/window.c b/unix/window.c index ba2c9700..1ebe1eb7 100644 --- a/unix/window.c +++ b/unix/window.c @@ -158,5 +158,9 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar) g_signal_connect(w->widget, "delete-event", G_CALLBACK(onClosing), w); uiWindowOnClosing(w, defaultOnClosing, NULL); + // normally it's SetParent() that does this, but we can't call SetParent() on a uiWindow + // TODO we really need to clean this up + g_object_ref(w->widget); + return w; }