ui: Add comments

This commit is contained in:
Hajime Hoshi 2018-10-08 01:42:43 +09:00
parent f6c2d899f1
commit 9264e38324

View File

@ -119,9 +119,13 @@ func currentMonitor() *glfw.Monitor {
}
if w == 0 {
// There is no window at launching.
// TODO: Use glfw.GetCurrentContext() like currentMonitor() in ui_unix.go.
return glfw.GetPrimaryMonitor()
}
// Get the current monitor by the window handle instead of the window position. It is because the window
// position is not relaiable in some cases e.g. when the window is put across multiple monitors.
m, err := monitorFromWindow(w, monitorDefaultToNearest)
if err != nil {
panic(err)