| Summary: | Window positions jumps when clicking on titlebar if input is grabbed | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Mike Blaguszewski <bugzilla> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | CC: | ewmailing, sezeroz |
| Version: | HG 1.2 | Keywords: | target-1.2.14 |
| Hardware: | PowerPC | ||
| OS: | Mac OS X (All) | ||
| Attachments: | Patch to 1.2 HEAD that fixes the issue | ||
|
Description
Mike Blaguszewski
2009-03-23 13:29:52 UTC
Created attachment 307 [details]
Patch to 1.2 HEAD that fixes the issue
Fixes bug in SDL 1.2.13 where clicking on an app's title bar to activate the app, when cursor capturing is enabled, will cause the window to jump. This is because SDL's handler for activate events calls a low-level Quartz function to move the cursor. Calling this when the mouse is down in the title bar confuses the WindowServer into thinking the title bar has been dragged. The patch defers processing of activate events in this case.
The bottom line is that CGWarpMouseCursorPosition() is not safe to call when the mouse in down in a window's title bar.
I should note that I'm submitting this patch to comply with the LGPL, since it is used in shipping products. We'd previously submitted this privately, but I think there was a miscommunication. I apologize for the delay. If someone thinks this is likely to be an issue in 1.3 as well, I can make a patch for that too. It's a nasty bug to track down, and I'd hate to see others bitten by it. Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14. Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla). --ryan. Would you supply a simple test program that reproduces the problem? I can reproduce this with his steps. This is fixed in subversion, thanks! |