Alex Szpakowski
When calling SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED), the window moves to the correct position but it seems to internally set its x/y position values to the literal value of the SDL_WINDOWPOS_CENTERED define.
This causes all sorts of problems when SDL functions which use the window position (e.g. SDL_SetWindowGrab) are called after the aforementioned SDL_SetWindowPosition call.
Looking at the SDL_SetWindowPosition code, it seems that SDL_SendWindowEvent with the SDL_WINDOWEVENT_MOVED event is called at the end of the function using the literal value of the SDL_WINDOWPOS_CENTERED define, instead of the newly set window->x and window->y values.
SDL_SendWindowEvent then sets the values of window->windowed.x and window->windowed.y to that value (0x2FFF0000, aka 805240832.)
I have attached a patch which changes SDL_SetWindowPosition to make sure SDL_SendWindowEvent is called with the correct coordinate values, if SDL_WINDOWPOS_CENTERED is used (fixes the issue for me.)
Tested with Mac OS 10.8.3.
This fixes a bug where relative mode would give a large jump if the
cursor was moved when the app doesn't have focus.
--HG--
extra : histedit_source : ff1b20a9e7f6e079c073c4ef761566b6c80b0f22%2C9879c6c838c69afea4aa2be80cbe137054600d12
By default, synthesizing events supresses real events for a quarter
second. This makes for some wonky behavior.
--HG--
extra : histedit_source : 769156e3eba77c601de006c5aad1cdc1febe1d6c
This isn't working great, so undo it until we can fix it properly to save /
restore mouse positions.
--HG--
extra : histedit_source : d8fe81a1690bd9406df132c325c8dd7c61baec29%2C2243b548ccaec444b2e4bdab04ba67cdf236c4fb
This fixes a bug where [NSCursor set] doesn't take when called in
certain event handlers (like windowDidBecomeKey:).
http://bugzilla.libsdl.org/show_bug.cgi?id=1795
--HG--
extra : histedit_source : 3f150addd3b1b7bc6397aba60ccf05f9065ffb8c
This tracks the previous hide/unhide state of the cursor, so we don't
re-hide a hidden cursor.
--HG--
extra : histedit_source : d41e30a604fb9ff0da8fcfdd9ca926618e35c750
There's a limit of one update every 250ms when warping the mouse, and we
can work around that by disassociating the cursor & the mouse before
issuing our warp, then re-associating them.
--HG--
extra : histedit_source : 91ddf6078107ea9faf1c769a459e99bce6e61180
This should hopefully fix bug #1612. We now send mousemotion events when
the cursor enters the window as well as when it leaves.
Thanks to Alex Szpakowski for the fix.
Fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1612
--HG--
extra : histedit_source : e89e8952efcc07da98a306757edeaeded31517a9