Potential fix: show the window before getting control preferred sizes; need to make setRect() locking first.
This commit is contained in:
parent
62d4886253
commit
d08ad65c4c
|
@ -85,15 +85,15 @@ func (w *Window) Open(control Control) (err error) {
|
||||||
return fmt.Errorf("error adding window's control: %v", err)
|
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?
|
// TODO separate showing?
|
||||||
err = w.sysData.show()
|
err = w.sysData.show()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error showing window (in Window.Open()): %v", err)
|
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
|
w.created = true
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue