| Summary: | [PATCH] Fix renderer visibility on a window maximized directly from the minimized state | ||
|---|---|---|---|
| Product: | SDL | Reporter: | id.zeta <id.zeta> |
| Component: | video | Assignee: | David Ludwig <dll> |
| Status: | RESOLVED FIXED | QA Contact: | David Ludwig <dll> |
| Severity: | normal | ||
| Priority: | P2 | CC: | dll |
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Windows 7 | ||
| Attachments: | PATCH | ||
*** Bug 3213 has been marked as a duplicate of this bug. *** I can confirm that this bug also occurs, as tested on one of my Windows 10 systems: * in SDL 2.0.3 based Win32 apps * in the latest SDL2 HG code, as of this writing (Revision 9966 / https://hg.libsdl.org/SDL/rev/cae9c97fabbd) * on WinRT, using the latest SDL2 HG code The patch that is listed does fix the bug for Win32 apps, but not WinRT apps. I'll plan on looking into why it doesn't work on WinRT. Fixed for Win32 via http://hg.libsdl.org/SDL/rev/0a420ec24b6a This bug is also happening on WinRT. I'll try working on a fix there in the next day or so. Fixed via https://hg.libsdl.org/SDL/rev/0a420ec24b6a (Win32 fix) and https://hg.libsdl.org/SDL/rev/fa7c016ac2d3 (WinRT fix) Many thanks for the patch, id.zeta! |
Created attachment 2332 [details] PATCH Some OS's eg. Windows 7 allows a window to be maximized directly from its "minimized onto Taskbar" state. Even SDL2 HG up to Revision 9946 overlooks this case and will then cause the renderer fail to become visible when the window is maximized from the minimized state. This attached patch fixes the issue by taking the SDL_WINDOWEVENT_MAXIMIZED event into account in SDL_RendererEventWatchas() to un-hide the renderer as well as exclusively setting/clearing the SDL_WINDOW_MINIMIZED and SDL_WINDOW_MAXIMIZED flags in SDL_SendWindowEvent().