SFML community forums

Help => Window => Topic started by: jfsimon1981 on December 25, 2020, 01:23:15 pm

Title: Opening windows hidden
Post by: jfsimon1981 on December 25, 2020, 01:23:15 pm
Good day,

I'd like to open a render window in hidden mode, though I found out this is not currently implemented and requires dealing with openGl directly.

Am I right, is there a way I didn't see ?

Thank you,

Jean-François
Title: Re: Opening windows hidden
Post by: Stauricus on December 25, 2020, 04:42:51 pm
hello
how exactly would be a hidden window? a window that can't be seen, but yet you can draw and use events from it? should it appear in the OS' taskbar (since if it does, may not be hidden enough for what you are planning)?

I believe there is no such thing built in SFML, but if you explain better what you are trying to do maybe we can help.
Title: Re: Opening windows hidden
Post by: jfsimon1981 on December 25, 2020, 06:02:03 pm
Hello,

At the moment, I have an application that can launch sub-systems.

I sometimes need to instanciate a window have it invisible as its initial state.
At the moment I instanciate and immediatly set it invisible:

void setVisible (bool visible)

This makes it flash thus I'd prefer start it invisible.

Jean-François
Title: Re: Opening windows hidden
Post by: Hapax on December 27, 2020, 05:13:27 pm
You could create the window tiny (1x1, for example) and quickly move it offscreen and resize it. You can then set it to be 'hidden'. This can be much less noticeable than working with a full size window.

That said, it looks like the ability to open a window without it being visible could well be available in the future...
https://en.sfml-dev.org/forums/index.php?topic=23578.0
Title: Re: Opening windows hidden
Post by: jfsimon1981 on December 28, 2020, 10:01:40 pm
Thanks I'll try it.

I remember from last time I tested this solution it was indeed kind of working.

Jean-François