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

Author Topic: Window Style::None causes transparent window to show  (Read 1093 times)

0 Members and 1 Guest are viewing this topic.

Khaki765

  • Newbie
  • *
  • Posts: 2
    • View Profile
Window Style::None causes transparent window to show
« on: January 27, 2018, 04:35:44 pm »
I have just started working with SFML and was trying to create a borderless fullscreen window.

I thought using the following code would work:
VideoMode desktop = VideoMode().getDesktopMode();
RenderWindow window(desktop, "Title", Style::None);

while (window.isOpen())
{
        Event e;
        while (window.pollEvent(e))
        {
                if (e.type == Event::Closed)
                        window.close();
        }
}

but for some reason the app will run but the window wont be visible. I can't click through it but even if i alt-tab and back again it doesnt cause the window to display. I can only assume I have missed out a step or something but both fullscreen and windowed work using this code.

Any help would be appreciated, thank you.

Using: SFML 2.4.2 on Win10 with GeForce 750Ti

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10191
    • View Profile
    • development blog
    • Email
Re: Window Style::None causes transparent window to show
« Reply #1 on: January 27, 2018, 04:42:23 pm »
You're not calling clear() or display() which you should. :)

If you're new, it might be useful to work through the official tutorials: https://www.sfml-dev.org/learn.php
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

Khaki765

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Window Style::None causes transparent window to show
« Reply #2 on: January 27, 2018, 04:45:27 pm »
Ahh yes, thank you.