I want to make it so when a sf::Window gets created, if it has a border, the position is set a bit to the left, to compensate for the border. Currently I just do this:
window.create(sf::VideoMode(conf::res.x, conf::res.y, conf::bpp), "Vania", sf::Style::Resize | sf::Style::Close, settings);
window.setPosition(window.getPosition() - sf::Vector2i(4, 0));
But there is a flicker when the position is updated and I'm not sure it is fully cross-platform (with different styles and whatnot). So I thought about changing the window implementation code (WindowImplWin32.cpp etc) and do it that way, but im not not sure how to get the border width in those :[
What would be the most clean way to do this?
Putting this here, maybe it will help someone in the future. Simple really, sorry to have started a whole thread about it.
Had to change this line:
int left = (GetDeviceCaps(screenDC, HORZRES) - static_cast<int>(mode.width)) / 2;
to this:
int left = (GetDeviceCaps(screenDC, HORZRES) - static_cast<int>(mode.width)) / 2 - GetSystemMetrics(SM_CXSIZEFRAME);
Now to figure out what I need to change for it to be cross platform ;)