From 4d0cc623fb959c50635660f39529de3d10e7f01e Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 22 Dec 2018 02:32:02 +0900 Subject: [PATCH] ui: Rename functions --- internal/ui/ui_glfw.go | 4 ++-- internal/ui/ui_mac.go | 2 +- internal/ui/ui_unix.go | 2 +- internal/ui/ui_windows.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index 0ba4a5161..b7966de29 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -104,7 +104,7 @@ func initialize() error { } // TODO: Fix this hack. currentMonitorImpl now requires u.window on POSIX. currentUI.window = w - currentUI.initMonitor = currentUI.currentMonitorImpl() + currentUI.initMonitor = currentUI.currentMonitorFromPosition() v := currentUI.initMonitor.GetVideoMode() s := glfwScale() currentUI.initFullscreenWidth = int(float64(v.Width) / s) @@ -858,5 +858,5 @@ func (u *userInterface) currentMonitor() *glfw.Monitor { return m } // Get the monitor which the current window belongs to. This requires OS API. - return u.currentMonitorImpl() + return u.currentMonitorFromPosition() } diff --git a/internal/ui/ui_mac.go b/internal/ui/ui_mac.go index d8f40e4b3..d53a30a86 100644 --- a/internal/ui/ui_mac.go +++ b/internal/ui/ui_mac.go @@ -58,7 +58,7 @@ func adjustWindowPosition(x, y int) (int, int) { return x, y } -func (u *userInterface) currentMonitorImpl() *glfw.Monitor { +func (u *userInterface) currentMonitorFromPosition() *glfw.Monitor { x := C.int(0) y := C.int(0) // Note: [NSApp mainWindow] is nil when it doesn't have its border. Use u.window here. diff --git a/internal/ui/ui_unix.go b/internal/ui/ui_unix.go index c80220111..04a3bdba8 100644 --- a/internal/ui/ui_unix.go +++ b/internal/ui/ui_unix.go @@ -37,7 +37,7 @@ func adjustWindowPosition(x, y int) (int, int) { return x, y } -func (u *userInterface) currentMonitorImpl() *glfw.Monitor { +func (u *userInterface) currentMonitorFromPosition() *glfw.Monitor { // TODO: Return more appropriate display. if cm, ok := getCachedMonitor(u.window.GetPos()); ok { return cm.m diff --git a/internal/ui/ui_windows.go b/internal/ui/ui_windows.go index 08ed59899..80f8bfc8f 100644 --- a/internal/ui/ui_windows.go +++ b/internal/ui/ui_windows.go @@ -121,7 +121,7 @@ func adjustWindowPosition(x, y int) (int, int) { return x, y } -func (u *userInterface) currentMonitorImpl() *glfw.Monitor { +func (u *userInterface) currentMonitorFromPosition() *glfw.Monitor { // TODO: Should we use u.window.GetWin32Window() here? w, err := getActiveWindow() if err != nil {