SetWindowFlags?

Hey there!

I’ve noticed that SDL 1.3 doesn’t have a SetWindowFlags function… but it
has a GetWindowFlags. If one wanted to change the style of a window at
runtime (as I do), such a method would prove very useful. I know that, in
the Win32 API, SetWindowLongPtr is the key function for changing window
flags, but I’m not sure how it is in X11 (there’s no doubt in my mind it’s
possible). Is there any chance we could get this put into SDL 1.3? Is there
a reason it’s not in there now?

Cheers,
Jeaye

I’ve noticed that SDL 1.3 doesn’t have a SetWindowFlags function… but it
has a GetWindowFlags. If one wanted to change the style of a window at
runtime (as I do), such a method would prove very useful. I know that, in
the Win32 API, SetWindowLongPtr is the key function for changing window
flags, but I’m not sure how it is in X11 (there’s no doubt in my mind it’s
possible). Is there any chance we could get this put into SDL 1.3? Is there
a reason it’s not in there now?

I think all of the flags except SDL_WINDOW_OPENGL, SDL_WINDOW_RESIZABLE
and SDL_WINDOW_BORDERLESS can be toggled through other APIs …
SDL_WINDOW_OPENGL should probably not be toggled (just create a new window).

Is it the BORDERLESS or RESIZABLE flag you care about?

–ryan.

Yes, it was RESIZABLE that I was initially looking to change. If I can get
the window’s HWND, I can manage on my own, but I haven’t found a way to
extract it. Know of one?

Cheers,
Jeaye

SDL_GetWindowWMInfo().

But I’m not sure the full ramifications of making a Window resizable
behind SDL’s back. This might cause you problems, but I don’t know.

In a perfect world, we should probably just add
SDL_SetWindowResizable(), but to be honest, it’d be low priority behind
other things that need to get done on SDL.

–ryan.On 7/19/11 8:49 PM, Jeaye wrote:

Yes, it was RESIZABLE that I was initially looking to change. If I can get
the window’s HWND, I can manage on my own, but I haven’t found a way to
extract it. Know of one?

Thanks for the function name; it looks promising! I’ll take a look at the
source and whip up an SDL_SetWindowResizable() and post it on here. If you
guys are too busy to implement it, I don’t see why I can’t. :slight_smile:

Cheers,
Jeaye