glfw/glfw — pull request #39 by nilium (2013-06-13 00:07:21+00:00)
Title: Fix cursor hiding on OS X.

There's probably still an oddity in here to do with having more than one
window's cursor disabled, but I don't think there's any sane fix for
that.

Anyway, the issue with cursors is actually pretty simple and mostly
down to a misreading of what I thought disableCursorRects did. Calling
it will stop the window from doing anything based on cursor rects, but
it will not restore cursor state to whatever it was prior to the window
using cursor rects. So, it's just letting you do your thing for as long
as they're disabled.

The fix for this is to simply not add a cursor rect when the window's
cursor is hidden. So, I moved the cursorHidden flag from the library
globals for OS X into the window flags, removed use of NSCursor show
and hide because that's just trouble waiting to happen, and now the
window only adds a cursor rect to hide the cursor if the cursor is
supposed to be hidden.

Because the cursor is moved into the window for when the cursor is
disabled, it functions the same as hiding and showing the cursor. When
the cursor is simply hidden, it also functions as expected.

Also, as a bonus, there's now less code. Fancy that.

This should close #3.