Yes, I call it after creating the window.
Sorry, here's an excerpt from my code, I've pulled some stuff out.
I guess I should note that in this particular case _owner->getX() and _owner->getY() return 1, so the window size is the desktop size, 1920x1200.
void WindowThread::operator ()()
{
sf::ContextSettings settings;
settings.depthBits = 16;
settings.stencilBits = 8;
sf::Window window(sf::VideoMode(width, height, desktop.bitsPerPixel), _owner->getName(),sf::Style::None,settings);
window.setMouseCursorVisible(true);
int x = static_cast<int>(desktop.width * _owner->getX());
int y = static_cast<int>(desktop.height * _owner->getY());
window.setPosition(sf::Vector2i(x, y));
window.setActive(false);
_owner->resize(width, height);
utility::refct_ptr<RenderThread> renderThread(new RenderThread(_owner, &window));
_owner->setRenderThread(renderThread);
renderThread->run();
sf::Event event;
sf::Keyboard::Key lastKey = sf::Keyboard::Unknown;
utility::Rect<int> mouseInfo(0,0,(int)width,(int)height);
while(wait(1000) != EWAIT_TERMINATE) {
//handle events
}
}
void RenderThread::operator ()()
{
while(wait(10000000) != EWAIT_TERMINATE) {
_window->setActive(true);
while(!_eventQueue.empty()) {
_eventQueue.front()();
_eventQueue.pop();
}
_owner->draw();
_window->display();
}
}