Skip to content

Commit

Permalink
Try #2 for bringing window to the front
Browse files Browse the repository at this point in the history
  • Loading branch information
defaultsamson committed Feb 20, 2020
1 parent ed9c9f2 commit d91a4c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/mainapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d91a4c1

Please sign in to comment.