ui: Bug fix: SetWindowIcon before Run didn't work

Fixes #755
This commit is contained in:
Hajime Hoshi 2018-12-18 23:16:06 +09:00
parent 1760070130
commit b3ce89aab1

View File

@ -107,10 +107,6 @@ func initialize() error {
currentUI.window.MakeContextCurrent()
if i := currentUI.getInitIconImages(); i != nil {
currentUI.window.SetIcon(i)
}
currentUI.window.SetInputMode(glfw.StickyMouseButtonsMode, glfw.True)
currentUI.window.SetInputMode(glfw.StickyKeysMode, glfw.True)
return nil
@ -541,6 +537,10 @@ func Run(width, height int, scale float64, title string, g GraphicsContext, main
}
u.window.SetInputMode(glfw.CursorMode, mode)
if i := currentUI.getInitIconImages(); i != nil {
currentUI.window.SetIcon(i)
}
// Get the monitor before showing the window.
//
// On Windows, there are two types of windows: