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. // TODO: Fix this hack. currentMonitorImpl now requires u.window on POSIX.
currentUI.window = w currentUI.window = w
currentUI.initMonitor = currentUI.currentMonitorImpl() currentUI.initMonitor = currentUI.currentMonitorFromPosition()
v := currentUI.initMonitor.GetVideoMode() v := currentUI.initMonitor.GetVideoMode()
s := glfwScale() s := glfwScale()
currentUI.initFullscreenWidth = int(float64(v.Width) / s) currentUI.initFullscreenWidth = int(float64(v.Width) / s)
@ -858,5 +858,5 @@ func (u *userInterface) currentMonitor() *glfw.Monitor {
return m return m
} }
// Get the monitor which the current window belongs to. This requires OS API. // 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 return x, y
} }
func (u *userInterface) currentMonitorImpl() *glfw.Monitor { func (u *userInterface) currentMonitorFromPosition() *glfw.Monitor {
x := C.int(0) x := C.int(0)
y := C.int(0) y := C.int(0)
// Note: [NSApp mainWindow] is nil when it doesn't have its border. Use u.window here. // 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 return x, y
} }
func (u *userInterface) currentMonitorImpl() *glfw.Monitor { func (u *userInterface) currentMonitorFromPosition() *glfw.Monitor {
// TODO: Return more appropriate display. // TODO: Return more appropriate display.
if cm, ok := getCachedMonitor(u.window.GetPos()); ok { if cm, ok := getCachedMonitor(u.window.GetPos()); ok {
return cm.m return cm.m

View File

@ -121,7 +121,7 @@ func adjustWindowPosition(x, y int) (int, int) {
return x, y return x, y
} }
func (u *userInterface) currentMonitorImpl() *glfw.Monitor { func (u *userInterface) currentMonitorFromPosition() *glfw.Monitor {
// TODO: Should we use u.window.GetWin32Window() here? // TODO: Should we use u.window.GetWin32Window() here?
w, err := getActiveWindow() w, err := getActiveWindow()
if err != nil { if err != nil {