diff --git a/src/app/main.cpp b/src/app/main.cpp index a82eaf50..2ea4c6f2 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -207,7 +207,7 @@ int main(int argc, char *argv[]) MessageStatus( std::string("Starting Sourcetrail ") + - (utility::getApplicationArchitectureType() == APPLICATION_ARCHITECTURE_X86_32 ? "32" : "64") + " bit, " + + (utility::getApplicationArchitectureType() == APPLICATION_ARCHITECTURE_X86_32 ? "32" : "64") + " bit, " + "version " + version.toDisplayString()).dispatch(); commandline::CommandLineParser commandLineParser(version.toString()); @@ -281,7 +281,14 @@ int main(int argc, char *argv[]) else { #ifdef _WIN32 - ShowWindow(GetConsoleWindow(), SW_HIDE); + HWND consoleWnd = GetConsoleWindow(); + DWORD dwProcessId; + GetWindowThreadProcessId(consoleWnd, &dwProcessId); + if (GetCurrentProcessId() == dwProcessId) + { + // Sourcetrail has not been started from console and thus has it's own console + ShowWindow(consoleWnd, SW_HIDE); + } #endif QtApplication qtApp(argc, argv);