Skip to content

Commit

Permalink
Only set the mouse cursor on the main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Feb 20, 2019
1 parent 7053fd6 commit 96c23a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion driver/gl/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ func (w *window) mouseMoved(viewport *glfw.Window, xpos float64, ypos float64) {
case *widget.Hyperlink:
cursor = hyperlinkCursor
}
viewport.SetCursor(cursor)
runOnMainAsync(func() {
viewport.SetCursor(cursor)
})
}

func (w *window) mouseClicked(viewport *glfw.Window, button glfw.MouseButton, action glfw.Action, mod glfw.ModifierKey) {
Expand Down

0 comments on commit 96c23a3

Please sign in to comment.