diff --git a/internal/ui/monitor_glfw.go b/internal/ui/monitor_glfw.go index c2edabe03..9c80a95e0 100644 --- a/internal/ui/monitor_glfw.go +++ b/internal/ui/monitor_glfw.go @@ -40,13 +40,7 @@ type Monitor struct { // Bounds returns the monitor's bounds. func (m *Monitor) Bounds() image.Rectangle { - ui := Get() - return image.Rect( - int(ui.dipFromGLFWMonitorPixel(float64(m.x), m.m)), - int(ui.dipFromGLFWMonitorPixel(float64(m.y), m.m)), - int(ui.dipFromGLFWMonitorPixel(float64(m.x+m.width), m.m)), - int(ui.dipFromGLFWMonitorPixel(float64(m.x+m.height), m.m)), - ) + return image.Rect(m.x, m.y, m.x+m.width, m.y+m.height) } // Name returns the monitor's name. diff --git a/monitor.go b/monitor.go index 35c6bd03c..49e6bf247 100644 --- a/monitor.go +++ b/monitor.go @@ -23,7 +23,8 @@ import ( // MonitorType represents a monitor available to the system. type MonitorType ui.Monitor -// Bounds returns the position and size of the monitor in device-independent pixels. +// Bounds returns the position and size of the monitor in pixels. +// Be careful that the unit is not device-independent pixels. func (m *MonitorType) Bounds() image.Rectangle { return (*ui.Monitor)(m).Bounds() }