| Summary: | Cursor is offsetted after video mode change during program execution | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Gabriel Gambetta <gabriel.gambetta> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED WORKSFORME | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P1 | ||
| Version: | HG 1.2 | ||
| Hardware: | All | ||
| OS: | Mac OS X (All) | ||
| Attachments: | Working patch | ||
Ryan, what do you think about this patch? Is this even still an issue? (In reply to comment #1) > Ryan, what do you think about this patch? Is this even still an issue? This patch is NASTY. :) Let me take a look at this...a lot has changed in that code since the original bug report. --ryan. Bumping priority on a few bugs that I would like examined more closely before 1.2.15 is finalized. This is not a promise that a bug will be fixed. We may close it with WONTFIX or WORKSFORME or something, but I just want to make sure attention is paid. --ryan. I can't reproduce this. It's either something we fixed, or it was a bug in 10.5 that's since been fixed. --ryan. |
Created attachment 474 [details] Working patch Steps to reproduce : - Open a SDL app that uses the SDL-drawn cursor - Change the screen resolution Tested with SDL 1.2.14 in OSX 10.5 Back in the app, the cursor isn't drawn at the same coordinates reported by SDL. This can be fixed by minimizing/restoring the window, or by moving the window a little by dragging the title bar. Apparently there's something wrong with the window frame after the mode switch, since this ugly piece of code fixes it : NSRect pRect = qz_window.frame; pRect.origin.y++; [qz_window setFrame:pRect display:0]; pRect.origin.y--; [qz_window setFrame:pRect display:0]; I'm attaching a patch that checks the display resolution in every PollEvents call and does the above trick if necessary.