Now that I'm not on my phone, I've tested it, but I can't reproduce your problem.
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "Hello");
while(window.isOpen())
{
sf::Event event;
while(window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
window.close();
else if(event.type == sf::Event::GainedFocus)
std::cout << "Gained" << std::endl;
else if(event.type == sf::Event::LostFocus)
std::cout << "Lost" << std::endl;
}
window.clear();
window.display();
}
}
It yields always the lost event if the window doesn't have the focus. So when you create it, you should be able to assume that it starts with the focus on the window and when it's lost, you'll get the lost event.
But maybe I didn't understand you clearly enough. In which situation do you don't have the focus, but also haven't received a lost event?