From d91a4c14684e88caca6cabd60e50e42ead37fe73 Mon Sep 17 00:00:00 2001 From: Samson Close Date: Wed, 19 Feb 2020 21:04:55 -0500 Subject: [PATCH] Try #2 for bringing window to the front --- src/mainapp.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mainapp.cpp b/src/mainapp.cpp index ec4b0c1..7b382a3 100644 --- a/src/mainapp.cpp +++ b/src/mainapp.cpp @@ -76,15 +76,14 @@ int main(int argc, char *argv[]) w.show(); w.restoreSizes(); - // window is a QWindow instance + // Bring attention to the window if a new instance is started QObject::connect( &a, &SingleApplication::instanceStarted, &w, - [&]{ w.raise(); w.activateWindow(); } + [&]{ w.raise(); w.activateWindow(); w.showNormal(); } ); - // Initializes audio engine on separate thread so that the UI starts super fast MyThread t(&w); t.start();