Set w.cursorVisible Properly

This commit is contained in:
theGeekPirate 2017-10-27 13:24:01 -07:00 committed by GitHub
parent ec0dbe4fc4
commit aa01c98322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -320,7 +320,7 @@ func (w *Window) VSync() bool {
// SetCursorDisabled both hides the cursor, as well as limits cursor movement to the Window client area. // SetCursorDisabled both hides the cursor, as well as limits cursor movement to the Window client area.
func (w *Window) SetCursorDisabled(disabled bool) { func (w *Window) SetCursorDisabled(disabled bool) {
w.cursorVisible = false w.cursorVisible = !disabled
mainthread.Call(func() { mainthread.Call(func() {
if disabled { if disabled {
w.window.SetInputMode(glfw.CursorMode, glfw.CursorDisabled) w.window.SetInputMode(glfw.CursorMode, glfw.CursorDisabled)