SFML community forums
Help => Window => Topic started by: TTK-Bandit on March 10, 2008, 01:34:37 am
-
I want to make the mouse turn the camera, when the opengl window is active (focused),
but the gainedFocus and lostFocus events are not reliable, often they come when they shouldnt, or they dont come when they should.
like when switching from windowed mode to fullscreen or vice versa, I always get lostFocus.
Is there any way to check wether the app has focus or not ? couldnt find anything except for the events.
-
but the gainedFocus and lostFocus events are not reliable, often they come when they shouldnt, or they dont come when they should.
like when switching from windowed mode to fullscreen or vice versa, I always get lostFocus.
It's because switching video mode requires to call sf::Window::Create, and it recreates the window (destroy the old one and create a new one). So you always get a LostFocus event, and no GainedFocus.
That's a know "bug" that will be fixed in the future. Then the focus events will be reliable enough ;)
-
ok, thx, any timeframe ? I know its always hard to give dates, but weeks or month ?
-
Sorry, I can't tell you. but probably weeks more than months ;)