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

Author Topic: Bring window to top/front  (Read 2804 times)

0 Members and 1 Guest are viewing this topic.

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Bring window to top/front
« on: August 10, 2012, 01:16:32 pm »
Hi

Is there an SFML way to bring a window to the top/front/whatever?

We have a bug where a menu launches the game, but still has focus - so when you click anywhere in the game window, you see a bit of what the menu had last (in this case, a black screen) - this lasts a frame or two, and then the game has focus.

I guess I can use Windows API's SetForegroundWindow(myWindowHandle) - but would prefer not to ;)

Thanks
Ed
SFML 2.1

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Bring window to top/front
« Reply #1 on: August 10, 2012, 01:28:01 pm »
I'm not quite sure if you're problem is really that the window isn't infront, because your description sounds more like you don't clear the screen in the beginning and thus the graphic memory could still filled with the menu thus showing it in your window.
Or have I understood you wrong?
Also is your menu within your SFML application or is that something external?
Could you ellaborate more (e.g. with images)?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/