From c403640c4a26919c44fa81be9bf340e4805ce653 Mon Sep 17 00:00:00 2001 From: doitux Date: Sun, 13 Sep 2009 18:51:36 +0000 Subject: [PATCH] activate first instance window when a second instance is started --- src/pokerth.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pokerth.cpp b/src/pokerth.cpp index 2473d25e..a9bea818 100755 --- a/src/pokerth.cpp +++ b/src/pokerth.cpp @@ -86,8 +86,9 @@ int main( int argc, char **argv ) /////// can be removed for non-qt-guis //////////// QtSingleApplication a( argc, argv ); - if (a.isRunning()) - return 0; + if (a.sendMessage("Wake up!")) { + return 0; + } //create defaultconfig ConfigFile *myConfig = new ConfigFile(argv[0], false); @@ -147,7 +148,7 @@ int main( int argc, char **argv ) startWindowImpl *mainWin = new startWindowImpl(myConfig); - a.setActivationWindow(mainWin); + a.setActivationWindow(mainWin, true); int retVal = a.exec();