We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3678 - osx cursor can move out of window while grabbed
Summary: osx cursor can move out of window while grabbed
Status: WAITING
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.5
Hardware: x86_64 macOS 10.12
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-22 21:57 UTC by vperus
Modified: 2017-08-03 16:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vperus 2017-06-22 21:57:55 UTC
Video with test program: https://streamable.com/yeete
Code https://gist.github.com/VPeruS/8b4baaf59940443c615a2ab32e7a0259

Real cursor is out of window. 
If you make big mouse move in edge direction while cursor is near it and then try move it back cursor will stay in same position.
Comment 1 Alex Szpakowski 2017-07-14 02:50:10 UTC
Have you tried compiling SDL with SDL_MAC_NO_SANDBOX defined? It enables a better method of mouse grabbing which should fix the issues you're seeing.

The reason why it's not used by default is, as the name implies, it's disallowed by the Mac App Store sandboxing rules.
Comment 2 vperus 2017-07-22 15:43:05 UTC
Also I run it on my VM. Use brew for downloading SDL. Will try to comiple manually with SDL_MAC_NO_SANDBOX.
Comment 3 vperus 2017-07-31 20:47:24 UTC
./confine CFLAGS="-DSDL_MAC_NO_SANDBOX" didnt help.
Comment 4 Sam Lantinga 2017-08-02 17:32:20 UTC
Have you tried it running natively with defining SDL_MAC_NO_SANDBOX? You can always get the mouse cursor out of a VM.

Also, did you confirm that the flag was making it into the compile?
Comment 5 vperus 2017-08-02 19:43:13 UTC
(In reply to Sam Lantinga from comment #4)
> Have you tried it running natively with defining SDL_MAC_NO_SANDBOX? You can
> always get the mouse cursor out of a VM.
> 
> Also, did you confirm that the flag was making it into the compile?

No I didn't, only on VM. CFLAGS variable in Makefile has -DSDL_MAC_NO_SANDBOX
Comment 6 Sam Lantinga 2017-08-03 16:40:54 UTC
Please try running natively instead of in a VM and see if you still see the problem.