diff --git a/docs/changelog.txt b/docs/changelog.txt index 2b800fc42..924adbd31 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -40,6 +40,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes ## Misc Improvements +- Terminal console no longer appears in front of the game window on startup ## Documentation diff --git a/library/Console-windows.cpp b/library/Console-windows.cpp index 515d89911..dd8ce9d84 100644 --- a/library/Console-windows.cpp +++ b/library/Console-windows.cpp @@ -508,6 +508,7 @@ bool Console::init(bool) inited = true; // DOESN'T WORK - locks up DF! // ForceForegroundWindow(d->MainWindow); + SetForegroundWindow(d->MainWindow); return true; } // FIXME: looks awfully empty, doesn't it? @@ -608,6 +609,7 @@ void Console::msleep (unsigned int msec) bool Console::hide() { ShowWindow( GetConsoleWindow(), SW_HIDE ); + SetForegroundWindow(d->MainWindow); return true; }