From 7ea1ab6b5862aa7fd9d563e49b6dbb2e3f416d8f Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 6 Oct 2018 03:22:31 +0900 Subject: [PATCH] ui: Bug fix: currentMonitor should not return nil Fixes #700 --- internal/ui/ui_glfw.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index 97e7445fb..a4bafa2af 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -773,7 +773,7 @@ func (u *userInterface) currentMonitor() *glfw.Monitor { ww, wh := w.GetSize() wr := image.Rect(wx, wy, wx+ww, wy+wh) - best := 0 + best := -1 var current *glfw.Monitor for _, m := range glfw.GetMonitors() { mx, my := m.GetPos()