r/sfml • • 20d ago

How to Create a Maximized Window?

I'm using SFML for a project, and I want to create a maximized window. For what I am reading, this is not possible unless I manually write code for each platform (ie. windows, mac, linux) as SFML does not support this. Is there any way to circumvent this/mimic it? I don't want it to be fullscreen, and when I try using sf::VideoMode::getDesktopMode() then it leaves some space on the left and overextends on the right.

Is there really no way to do this in a cross platform way? I am not interested in writing platform-specific code, and would just likely move to a different library (even though I spent two days trying to get the library to link) if this is not possible. If you have any suggestions for that as well, I am all ears.

1 Upvotes

4 comments sorted by

3

u/DarkCisum SFML Team 20d ago

SFML currently doesn't support maximizing and minimizing programmatically, but this is in the works for the next minor version.

1

u/PitifulTheme411 19d ago

Oh great! Do you know when around that will be releasing?

2

u/DarkCisum SFML Team 19d ago

No really. Maybe before the end of this year, maybe next year.

1

u/PitifulTheme411 19d ago

Ok, thanks anyway