| Summary: | Wrong window dimensions reported after calling SDL_SetWindowResize on a snapped/maximized window | ||
|---|---|---|---|
| Product: | SDL | Reporter: | ny00 |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | szaszg |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | Test case | ||
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! I just tested this with the latest SDL snapshot: http://www.libsdl.org/tmp/SDL-2.0.zip The behavior I saw was that the window was maximized, and then the window size was set, taking it out of maximized state. Ryan, can you check to see if this is what happens on Linux, or is the window manager messing with us here? |
Created attachment 1593 [details] Test case Suppose that an app lets the user resize a window, but also tries to resize the window on its own later using SDL_SetWindowSize, for a specific in-app event (not necessarily an "SDL event"). If it fails to do so, because the user has snapped the window to one of the desktop's sides or maximized the window beforehand, then the app should still be able to handle this case in some way. Problem is the wrong window dimensions are reported by SDL_GetWindowSize. A test case has been attached, demonstrating the issue. While the application maximizes the window automatically, manual maximization leads to the same problem. It is true that SDL seems to have tools for handling maximized windows, I'm not sure about other actions like snapping, though, and it is probably the wrong way to check for a list of specific possible actions applied to the window by the user (or even the OS automatically) anyway. A few details about the local environment: - OS: Ubuntu 12.04 for x86-64 with the Unity shell - GPU: GTX 460 - GPU drivers version: 331.38