I did some other tests.
Actually, my monitor resolution is never changed when I request a VideoMode of 800x600x24 (I discovered that my screen supported only 24 bits per pixels according to nvidia driver). The desktop resolution does not change as it happens with some others games on windows.
So, as you said, it seems that the resolution is quickly set to 1600x900, that's why I get this last one most of the time.
By the way, I displayed
auto videoMode = sf::VideoMode(800, 600, 24);
std::cout << "isValid " << videoMode.isValid() << std::endl;
And the function isValid() returns true (1). So that should be fine, except if for some reasons, it's not really valid...
(I also have this VideoMode listed by sf::VideoMode::getFullscreenModes()).
I also displayed
sf::VideMode::getDesktopMode()
and I always get 1600x900x24.
Now that I'm writing this, I just get that since I
always have the problem, and not only times to times. The message I talked about is probably usefull
Failed to set new screen configuration
I will investigate why I get this fail message.