| Summary: | macOS: fullscreen toggle does not maintain SDL_Renderer's logical size | ||
|---|---|---|---|
| Product: | SDL | Reporter: | David Ludwig <dll> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | dll |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | macOS 10.12 | ||
| Attachments: |
code for sample application (to reproduce bug with)
screenshot of expected result, using attached sample code screenshot of observed result, using attached sample code possible fix, #1 |
||
|
Description
David Ludwig
2017-09-02 20:40:31 UTC
Created attachment 2907 [details]
screenshot of expected result, using attached sample code
Created attachment 2908 [details]
screenshot of observed result, using attached sample code
This bug started appearing in changeset 11421 : https://hg.libsdl.org/SDL/rev/f9d5845f2311 Created attachment 2910 [details] possible fix, #1 Here is a possible fix for this bug. In my own testing (on macOS 10.12), it does not reintroduce the bug (#3719, https://bugzilla.libsdl.org/show_bug.cgi?id=3719) that changeset 11421 fixed. It also fixes the reopened bug 3719's issue, whereby the SDL window can unexpectedly move, after switching from fullscreen to windowed mode. Changeset 11421 does not invoke the SDL_Renderer's viewport-updating routines, due in part to [Cocoa_WindowListener windowDidResize:] ceasing to be called (via change 11421). This change re-introduces the manual call to [Cocoa_WindowListener windowDidResize:], which updates the renderer's viewport, and leaves the window in the expected position. Patch added, thanks! https://hg.libsdl.org/SDL/rev/f76299105635 |