| Summary: | SDL_SetWindowPosition does not respect the display passed in for SDL_WINDOWPOS_CENTERED_DISPLAY(?) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Edward Rudd <urkle> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | HG 2.0 | Keywords: | triage-2.0.4 |
| Hardware: | x86 | ||
| OS: | Other | ||
| Attachments: |
Patch to fix the SetWindowPosition behvior
updated patch to be C90 compliant. |
||
Created attachment 2029 [details]
updated patch to be C90 compliant.
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though! This patch is now https://hg.libsdl.org/SDL/rev/c9a4d606f6db, thanks! --ryan. |
Created attachment 1995 [details] Patch to fix the SetWindowPosition behvior When I run this SDL code SDL_SetWindowPosition(sdlWin, SDL_WINDOWPOS_CENTERED_DISPLAY(1), SDL_WINDOWPOS_CENTERED_DISPLAY(1)); I expect the window to 'move' from the first screen to the second screen. However it doesn't as the SetWindowPosition code only looks at where the window currently is to determine the display index. a side-effect of this change would be that if some existing code *assumed* that this code SDL_SetWindowPosition(sdlWin, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); would center the window on the current monitor, would start to not work as expected. (it would always center on the first monitor) However, that is undocumented behaviour, and I believe this patch implements the correct expected behavior of this method.