From 789999b936cd2c081036da5da44cc8975ef97a6f Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 29 Sep 2011 18:34:52 -0700 Subject: [PATCH] Initialize the size of a . Realize signals often arrive before allocation signals. --- src/gtk/fix-layout.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gtk/fix-layout.scm b/src/gtk/fix-layout.scm index fb867ccf1..b55006d76 100644 --- a/src/gtk/fix-layout.scm +++ b/src/gtk/fix-layout.scm @@ -70,7 +70,9 @@ USA. (let ((alien (gobject-alien widget))) (let ((w (->requisition-fixnum width)) (h (->requisition-fixnum height))) - (C-call "gtk_widget_set_size_request" alien w h)) + (C-call "gtk_widget_set_size_request" alien w h) + ;; Init. size, for a realize signal arriving before an allocation. + (set-fix-rect-size! (fix-widget-geometry widget) w h)) (C-call "gtk_widget_set_has_window" alien 1)) ; WILL have when realized (set-gtk-object-destroy-callback! widget) -- 2.25.1