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 3288 - Resizable not settable after window creation
Summary: Resizable not settable after window creation
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.4
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
: 3327 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-13 13:14 UTC by cra0zy@gmail.com
Modified: 2016-09-30 20:40 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cra0zy@gmail.com 2016-03-13 13:14:25 UTC
From https://wiki.libsdl.org/CategoryVideo there doesn't seem to be a way of setting window resizable property after the window has been created.

I know that SDL 1.2 could change this property.
Comment 1 Alex Szpakowski 2016-03-15 16:31:28 UTC
(In reply to cra0zy@gmail.com from comment #0)
> I know that SDL 1.2 could change this property.

Are you sure? As far as I know, resizing was only specified in SDL_SetVideoMode (which (re)creates the window).
Comment 2 cra0zy@gmail.com 2016-03-15 17:34:24 UTC
I knew about the function, but I didn't know it recreated the entire window just to do it...

Are there any API limitations that prevent you from adding this functionality?
Comment 3 Alex Szpakowski 2016-03-15 20:09:22 UTC
on iOS nothing prevents it, and on OS X nothing prevents it in 10.6+. SDL still supports 10.5 but probably not for much longer. I don't know the other platform APIs well enough to say whether it's possible in Windows / Linux / Android without double-checking.
Comment 4 Alex Szpakowski 2016-03-15 20:10:41 UTC
Er, to clarify, I mean the platform APIs do support changing resizability at runtime without recreating the window, on iOS and OS X (even though SDL doesn't yet).
Comment 5 cra0zy@gmail.com 2016-03-15 22:31:27 UTC
Thanks for the info.

If you were wondering why I needed this, well I am currently working on SDL2 version of MonoGame, and one of the things it needs is a way of setting window resizable param: https://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gamewindow.allowuserresizing.aspx

For now I've just delayed window creation to after the constructor so resizable param can be set in it, tho it can't be changed later on.
Comment 6 cra0zy@gmail.com 2016-09-30 12:49:06 UTC
The patch https://hg.libsdl.org/SDL/rev/ad12658bc7ae fixed this.
Comment 7 Philipp Wiesemann 2016-09-30 20:40:33 UTC
*** Bug 3327 has been marked as a duplicate of this bug. ***