From 987f333d954359b5366ea0df81475ec0a0f5e843 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 21 Dec 2019 17:34:58 +0900 Subject: [PATCH] uidriver/glfw: Rename variables --- internal/uidriver/glfw/ui.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index a2c28354e..97ba6140f 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -61,8 +61,8 @@ type UserInterface struct { initCursorMode driver.CursorMode initWindowDecorated bool initWindowResizable bool - initWindowPositionX int - initWindowPositionY int + initWindowPositionXInDP int + initWindowPositionYInDP int initScreenTransparent bool initIconImages []image.Image @@ -84,13 +84,13 @@ const ( var ( theUI = &UserInterface{ - origPosX: invalidPos, - origPosY: invalidPos, - initCursorMode: driver.CursorModeVisible, - initWindowDecorated: true, - initWindowPositionX: invalidPos, - initWindowPositionY: invalidPos, - vsync: true, + origPosX: invalidPos, + origPosY: invalidPos, + initCursorMode: driver.CursorModeVisible, + initWindowDecorated: true, + initWindowPositionXInDP: invalidPos, + initWindowPositionYInDP: invalidPos, + vsync: true, } ) @@ -290,8 +290,8 @@ func (u *UserInterface) setInitIconImages(iconImages []image.Image) { func (u *UserInterface) getInitWindowPosition() (int, int) { u.m.RLock() defer u.m.RUnlock() - if u.initWindowPositionX != invalidPos && u.initWindowPositionY != invalidPos { - return u.initWindowPositionX, u.initWindowPositionY + if u.initWindowPositionXInDP != invalidPos && u.initWindowPositionYInDP != invalidPos { + return u.initWindowPositionXInDP, u.initWindowPositionYInDP } return invalidPos, invalidPos } @@ -300,8 +300,8 @@ func (u *UserInterface) setInitWindowPosition(x, y int) { u.m.Lock() defer u.m.Unlock() - u.initWindowPositionX = x - u.initWindowPositionY = y + u.initWindowPositionXInDP = x + u.initWindowPositionYInDP = y } // toDeviceIndependentPixel must be called from the main thread.