summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaeyeon Mori <orochimarufan.x3@gmail.com>2014-04-17 14:13:16 +0200
committerTaeyeon Mori <orochimarufan.x3@gmail.com>2014-04-17 14:13:16 +0200
commit0959aeb046d53f966646f3bc7d0e44d344341ebe (patch)
tree4653fb5f3683026ec45b25e6017d5a4fa57ae367
parentbf1632e4ed09f3fdc140b25a67b82f2bedb66f76 (diff)
downloadMultiMC-0959aeb046d53f966646f3bc7d0e44d344341ebe.tar
MultiMC-0959aeb046d53f966646f3bc7d0e44d344341ebe.tar.gz
MultiMC-0959aeb046d53f966646f3bc7d0e44d344341ebe.tar.lz
MultiMC-0959aeb046d53f966646f3bc7d0e44d344341ebe.tar.xz
MultiMC-0959aeb046d53f966646f3bc7d0e44d344341ebe.zip
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
-rw-r--r--MultiMC.cpp1
-rw-r--r--gui/ConsoleWindow.cpp7
2 files changed, 8 insertions, 0 deletions
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)