Potential fix: show the window before getting control preferred sizes; need to make setRect() locking first.

This commit is contained in:
Pietro Gagliardi 2014-02-24 14:05:38 -05:00
parent 62d4886253
commit d08ad65c4c
1 changed files with 4 additions and 4 deletions

View File

@ -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
}