Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Opening windows hidden  (Read 6250 times)

0 Members and 1 Guest are viewing this topic.

jfsimon1981

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Opening windows hidden
« 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

Stauricus

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
    • A Mafia Graphic Novel
    • Email
Re: Opening windows hidden
« Reply #1 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.
Visit my game site (and hopefully help funding it? )
Website | IndieDB

jfsimon1981

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: Opening windows hidden
« Reply #2 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
« Last Edit: December 25, 2020, 06:04:38 pm by jfsimon1981 »

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Opening windows hidden
« Reply #3 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
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

jfsimon1981

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: Opening windows hidden
« Reply #4 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