From 9264e383246d024eb7f290eb1e4e1ad163d824b1 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 8 Oct 2018 01:42:43 +0900 Subject: [PATCH] ui: Add comments --- internal/ui/ui_windows.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/ui/ui_windows.go b/internal/ui/ui_windows.go index 474786a85..37dce5f87 100644 --- a/internal/ui/ui_windows.go +++ b/internal/ui/ui_windows.go @@ -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)