So, I use lubuntu 12.10, the window manager is openbox. Code:
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::RenderWindow window(sf::VideoMode(1400, 900), "Bug");
window.setPosition(sf::Vector2i(sf::VideoMode::getDesktopMode().width / 2 - window.getSize().x / 2, 80));
std::cout << window.getPosition().x; //gives 1
std::cout << window.getPosition().y; //gives 26
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
}
My resolution is 1920x1080, so it should be x = 260. Of course, the position isn't updated on screen as well.