diff --git a/backends/opengl/input.go b/backends/opengl/input.go index 06b425d..dffd95d 100644 --- a/backends/opengl/input.go +++ b/backends/opengl/input.go @@ -262,6 +262,9 @@ func (w *Window) initInput() { }) w.window.SetCursorEnterCallback(func(_ *glfw.Window, entered bool) { + if entered && w.cursor != nil { + w.window.SetCursor(w.cursor) + } w.input.MouseEnteredEvent(entered) if w.mouseEnteredCallback != nil { w.mouseEnteredCallback(w, entered) diff --git a/backends/opengl/window.go b/backends/opengl/window.go index 1e023fa..efa0108 100644 --- a/backends/opengl/window.go +++ b/backends/opengl/window.go @@ -230,7 +230,6 @@ func (w *Window) Destroy() { // Update swaps buffers and polls events. Call this method at the end of each frame. func (w *Window) Update() { - w.SetCursor(w.cursor) w.SwapBuffers() w.UpdateInput() }