aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2014-08-07 11:24:34 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2014-08-07 11:24:34 +0000
commit2436955a59eed027b02ce73595c8682fd59aa423 (patch)
tree0b30a5b9ccf158ae3b3336818d0145e3e49f9780 /src
parentddc743a51f01d4fea2d528cd0446863256356d75 (diff)
downloadqmmp-2436955a59eed027b02ce73595c8682fd59aa423.tar.gz
qmmp-2436955a59eed027b02ce73595c8682fd59aa423.tar.bz2
qmmp-2436955a59eed027b02ce73595c8682fd59aa423.zip
fixed main window activation (windows only)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4425 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/app/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp
index b649ee35d..fc902d37f 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -25,12 +25,20 @@
#include <QIcon>
#include <stdio.h>
#include <stdlib.h>
+#ifdef Q_OS_WIN
+#include <windows.h>
+#include <winuser.h>
+#endif
#include <qmmp/qmmp.h>
#include "qmmpapplication.h"
#include "qmmpstarter.h"
int main(int argc, char *argv[])
{
+#ifdef Q_OS_WIN
+ //allows to activate main window from other instances
+ AllowSetForegroundWindow(ASFW_ANY);
+#endif
QmmpApplication a (argc, argv );
a.setApplicationName("qmmp");
a.setWindowIcon(QIcon(":/32x32/qmmp.png"));