ui: Bug fix: The window must be shown on the current monitor (#829)

This commit is contained in:
Hajime Hoshi 2019-02-24 23:26:07 +09:00
parent d4a522d9da
commit ba59cdbc5f

View File

@ -639,7 +639,10 @@ func Run(width, height int, scale float64, title string, g GraphicsContext, main
x := mx + (v.Width-w)/2
y := my + (v.Height-h)/3
// Adjusting the position is needed only when the monitor is primary. (#829)
if mx == 0 && my == 0 {
x, y = adjustWindowPosition(x, y)
}
u.window.SetPos(x, y)
u.window.SetSizeCallback(func(_ *glfw.Window, width, height int) {