We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3327 - SDL_SetWindowResizable
Summary: SDL_SetWindowResizable
Status: RESOLVED DUPLICATE of bug 3288
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.4
Hardware: All All
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-09 07:36 UTC by Intellectual Kitty
Modified: 2016-09-30 20:40 UTC (History)
3 users (show)

See Also:


Attachments
SDL_SetWindowResizable (11.56 KB, patch)
2016-05-17 14:54 UTC, Ethan Lee
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Intellectual Kitty 2016-05-09 07:36:16 UTC
There seems to be no way currently the change a window's resizable status, so a function like SDL_SetWindowResizable – similar to SDL_SetWindowBordered – would be advantageous.  For instance, if a user decides to play your game in windowed mode rather than fullscreen, you might wish to change your fullscreen window into a windowed mode window and remove the borderless attribute but also add the resizable attribute so that the user can adjust the window to his or her needs.
Comment 1 Alex Szpakowski 2016-05-09 16:29:26 UTC
In your specific example at least, creating the window with the resizable flag set initially should do the trick - it will still go fullscreen when you want, and it will be resizable when in windowed mode.
Comment 2 Alex Szpakowski 2016-05-09 16:30:48 UTC
(Also note that for going fullscreen you should ideally use the SDL_WINDOW_FULLSCREEN_DESKTOP or SDL_WINDOW_FULLSCREEN flags with either SDL_CreateWindow or SDL_SetWindowFullscreen, rather than setting the window's borderless status.)
Comment 3 Intellectual Kitty 2016-05-10 05:50:32 UTC
Thank you clarifying these points.
Comment 4 Ethan Lee 2016-05-17 14:54:33 UTC
Created attachment 2456 [details]
SDL_SetWindowResizable

I wrote a patch for this a while ago and sent it to Ryan/Sam for review, but I didn't hear back... feel free to try this out.
Comment 5 Philipp Wiesemann 2016-09-30 20:40:33 UTC
SDL_SetWindowResizable() was added for SDL 2.0.5.

*** This bug has been marked as a duplicate of bug 3288 ***