From 0959aeb046d53f966646f3bc7d0e44d344341ebe Mon Sep 17 00:00:00 2001 From: Taeyeon Mori Date: Thu, 17 Apr 2014 14:13:16 +0200 Subject: [PATCH] Make the console window raise itself after minecraft closes (#193) This needs further testing: http://stackoverflow.com/questions/6087887/bring-window-to-front-raise-show-activatewindow-dont-work --- MultiMC.cpp | 1 + gui/ConsoleWindow.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/MultiMC.cpp b/MultiMC.cpp index ddc1fca7..b0a8848f 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -412,6 +412,7 @@ void MultiMC::initGlobalSettings() // Console m_settings->registerSetting("ShowConsole", true); + m_settings->registerSetting("RaiseConsole", true); m_settings->registerSetting("AutoCloseConsole", true); m_settings->registerSetting("LogPrePostOutput", true); diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp index 621f035f..18a617e0 100644 --- a/gui/ConsoleWindow.cpp +++ b/gui/ConsoleWindow.cpp @@ -265,6 +265,13 @@ void ConsoleWindow::onEnded(BaseInstance *instance, int code, QProcess::ExitStat */ if (!isVisible()) show(); + + // Raise Window + if (MMC->settings()->get("RaiseConsole").toBool()) + { + raise(); + activateWindow(); + } } void ConsoleWindow::onLaunchFailed(BaseInstance *instance)