You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.0 Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2014-03-18 21:05:07 +0000, wrote:
Created attachment 1594
Test cases
A window can be resized to out-ot-bounds dimensions even if any of SDL_SetWindowMinimumSize and SDL_SetWindowMaximumSize is called, given the following steps are done in the given order:
First, the window is created without the SDL_WINDOW_OPENGL flag set.
Then SDL_SetWindowMinimumSize and/or SDL_SetWindowMaximumSize are/is called.
Afterwards a new renderer is created.
Sample code is attached with a test case. By playing with a few definitions given at the top of the code you can generate a few more tests:
Manage a GL context directly (SDL_GL_CreateContext) or access an SDL 1.2 style window surface (SDL_GetWindowSurface), rather than using a renderer (SDL_CreateRenderer).
Set window bounds after calling any of these (say SDL_CreateRenderer) rather than before.
Optionally add SDL_WINDOW_OPENGL as a flag on window creation.
A few gotchas that should be added for the various cases:
An OpenGL context cannot be created without SDL_WINDOW_OPENGL. I have added a compile-time error shown upon an attempt to do so.
If the window bounds are set after the call to SDL_GetWindowSurface, then the surface gets invalidated and a new surface should be retrieved again (I suppose that's the expected behavior).
As in the case of SDL_CreateRenderer, if the bounds are set before the (only) call to SDL_GetWindowSurface then the window can be resized to out-of-bounds dimensions.
In addition:
If the hint SDL_HINT_RENDER_DRIVER is set to "software" before the call to SDL_Hint is done (say by setting the environment variable SDL_RENDER_DRIVER to the same value), then the bounds hold (with the same code as originally attached to this bug report).
The latter point applies if a window surface is used, too.
On 2015-02-19 05:22:22 +0000, Ryan C. Gordon wrote:
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!
On 2016-01-31 14:27:08 +0000, Rafał Mużyło wrote:
I think I see a related problem.
This seems to be a case of unintended side-effects, that are beneficial here.
SDL_WINDOW_OPENGL is the flag that has those side-effects.
Another test would be to create a FULLSCREEN_DESKTOP window smaller than the desktop.
If you unset fullscreen, the window will still have the size of the desktop.
If SDL_WINDOW_OPENGL is set, once again, the window is restored to its expected size.
The text was updated successfully, but these errors were encountered:
SDL 2.0 is now in maintenance mode, and all inactive issues are being closed. If this issue is impacting you, please feel free to reopen it with additional information.
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.0
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2014-03-18 21:05:07 +0000, wrote:
On 2015-02-19 05:22:22 +0000, Ryan C. Gordon wrote:
On 2016-01-31 14:27:08 +0000, Rafał Mużyło wrote:
The text was updated successfully, but these errors were encountered: