From d08ad65c4c8c9b6d896380443591e50996d2a058 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 24 Feb 2014 14:05:38 -0500 Subject: [PATCH] Potential fix: show the window before getting control preferred sizes; need to make setRect() locking first. --- window.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/window.go b/window.go index 6a0e6ea..175f48a 100644 --- a/window.go +++ b/window.go @@ -85,15 +85,15 @@ func (w *Window) Open(control Control) (err error) { return fmt.Errorf("error adding window's control: %v", err) } } - err = w.sysData.setWindowSize(w.initWidth, w.initHeight) - if err != nil { - return fmt.Errorf("error setting window size (in Window.Open()): %v", err) - } // TODO separate showing? err = w.sysData.show() if err != nil { return fmt.Errorf("error showing window (in Window.Open()): %v", err) } + err = w.sysData.setWindowSize(w.initWidth, w.initHeight) + if err != nil { + return fmt.Errorf("error setting window size (in Window.Open()): %v", err) + } w.created = true return nil }