From e332ba008bd531fd403bfcca0da3c720ae2828f1 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Tue, 29 May 2018 21:11:26 +0200 Subject: [PATCH] app: fix setting dock window size from GimpSessionInfo In gimp_session_info_apply_geometry(), use gtk_window_resize() instead of gtk_window_set_default_size() which magically fixes things. Leave a big comment there because set_default_size() should just work. --- app/widgets/gimpsessioninfo.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/widgets/gimpsessioninfo.c b/app/widgets/gimpsessioninfo.c index 0ff5a4b91b..7f895fd80d 100644 --- a/app/widgets/gimpsessioninfo.c +++ b/app/widgets/gimpsessioninfo.c @@ -681,9 +681,20 @@ gimp_session_info_apply_geometry (GimpSessionInfo *info, info->p->width > 0 && info->p->height > 0) { + /* This used to call gtk_window_set_default_size() which worked + * fine in gtk2 and should continue to work, but doesn't for + * dock windows. gtk_window_resize() seems to work fine for all + * windows. Leave this comment here until we figured what's + * going on... + */ +#if 1 + gtk_window_resize (GTK_WINDOW (info->p->widget), + info->p->width, info->p->height); +#else gtk_window_set_default_size (GTK_WINDOW (info->p->widget), info->p->width, info->p->height); - } +#endif + } gtk_window_get_size (GTK_WINDOW (info->p->widget), &width, &height);