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

Author Topic: Grabbing focus  (Read 1980 times)

0 Members and 1 Guest are viewing this topic.

FRex

  • Hero Member
  • *****
  • Posts: 1840
  • Not doing gamedev/using SFML lately
    • View Profile
    • Email
Grabbing focus
« on: November 21, 2013, 10:36:43 pm »
Forcing the sf::Window to be the one that currently has focus and is on top.
On Linux it's XRaiseWindow, on Windows - SetForegroundWindow, in both cases we already store variables needed for the call anyway in the window impl for that platform, I don't know what it is on Mac OS X but I doubt it's much worse.
I'm not using SFML nor doing any gamedev lately.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10231
    • View Profile
    • development blog
    • Email
Re: Grabbing focus
« Reply #1 on: November 22, 2013, 12:50:37 am »
You mean like this thread? ;)

Not the same feature at all, but relevant discussion anyways on GitHub.
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/

FRex

  • Hero Member
  • *****
  • Posts: 1840
  • Not doing gamedev/using SFML lately
    • View Profile
    • Email
Re: Grabbing focus
« Reply #2 on: November 22, 2013, 07:52:51 am »
More like this thread : http://en.sfml-dev.org/forums/index.php?topic=3817.0
I also found one or two others about getting focus(not setting it) and Laurent just always says there is no such function. :P

Quote
Not the same feature at all, but relevant discussion anyways on GitHub.
Yes, not the same feature at all, it's pinning on top, not stealing focus like after normal mouse click. :P
It's not that relevant, stealFocus(); wouldn't be a style flag, it'd make no sense at all, it doesn't keep or modify any state, it's like a fake mouse click in the window that brings it to top(side effect of grabbing focus by function it seems) and makes it focused, it doesn't keep the focus from going away or anything.
« Last Edit: November 22, 2013, 07:56:38 am by FRex »
I'm not using SFML nor doing any gamedev lately.

 

anything