Client should only use setWindowPos in windowed mode

fix-linux-multi-monitor
nimetu 3 years ago
parent f6a020bd3a
commit 9a219fb410

@ -1235,27 +1235,9 @@ void prelogInit()
Driver->setWindowIcon(bitmaps); Driver->setWindowIcon(bitmaps);
#endif #endif
sint32 posX = 0, posY = 0;
if (ClientCfg.Windowed)
{
// use position saved in config // use position saved in config
posX = ClientCfg.PositionX; if (ClientCfg.Windowed)
posY = ClientCfg.PositionY; Driver->setWindowPos(ClientCfg.PositionX, ClientCfg.PositionY);
}
else
{
// position is not saved in config so center the window
UDriver::CMode tmp;
if (Driver->getCurrentScreenMode(tmp))
{
posX = (tmp.Width - Driver->getWindowWidth())/2;
posY = (tmp.Height - Driver->getWindowHeight())/2;
}
}
// Set the window position
Driver->setWindowPos(posX, posY);
// Show the window // Show the window
Driver->showWindow(); Driver->showWindow();

Loading…
Cancel
Save