ui: Rename functions

This commit is contained in:
Hajime Hoshi 2018-12-22 02:32:02 +09:00
parent e809991c9f
commit 4d0cc623fb
4 changed files with 5 additions and 5 deletions

View File

@ -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()
}

View File

@ -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.

View File

@ -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

View File

@ -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 {