I like it! Reminds me a bit of how GLFW does it.
I see 2 things I'd like to comment on:
1. I'd rename
sf::Screen::frameRate to
sf::Screen::refreshRate, to be a bit more semantically (is that the right usage? can never remember...) correct.
2. On that note, refresh rate is more of a video mode concept, not really a monitor concept. A monitor will define its max refresh rate, but a monitor can support more than 1 refresh rate. For instance, my monitors claim to support 60, 59, 50, 30, 29, and 25 (the last 3 being interlaced). But also support 75 Hz at 1280x1024 and below. So maybe refresh rate should be an addition to
sf::VideoMode, ideally.
Now that I'm looking at it again...
3. I don't think
sf::Screen should be a member/accessible through
sf::VideoMode. I think you did for backwards compatibility, but that kind of feels backward. A video mode is dependent on a screen/monitor, not the other way around. That's my thoughts on it. I think it might make more sense to have
sf::VideoMode through
sf::Screen. For example:
std::size_t totalMonitors = sf::Screen::count();
for(std::size_t i = 0; i < totalMonitors; ++i)
{
std::vector<sf::VideoMode> modes = sf::Screen::get(i).getFullscreenModes();
for(auto& vm : modes)
{
std::cout << "Screen #" << i << ": " << mode.width << "x" << mode.height << " - " << mode.bitsPerPixel << " bpp @ " << mode.refreshRate << " Hz\n";
}
}
That's my idea for an API at least. That would allow for less modification to
sf::VideoMode as well. Minus the additional
refreshRate member.
sf::Screen having a "maxRefreshRate" or something might not be a bad thing. Maybe a bit redundant though.
I do think
sf::VideoMode should still be accessible without
sf::Screen though. That would keep things backwards compatible. Just use the primary monitor maybe?
Anyways, those are my (much more numerous than I initially thought!) thoughts as of now... I'm interested in what other people say!
If/when a final public API is decided on, I'd love to contribute, maybe with a Linux implementation?
EDIT: Downloading/compiling your fork now.
EDIT 2: Working great here! (Win 8.1, 3 monitors, GTX970, unfortunately quite similar to your config, haha.) Changed which monitor to open the window on and that works great as well.