diff options
author | Jonathan Bauer | 2019-09-24 11:19:58 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-09-24 11:19:58 +0200 |
commit | 2f967194db5a4b7ce667a1c30baab800e78213fb (patch) | |
tree | e16df77bf83e67dd570d47a4c7e49da2f919bfff | |
parent | Fix the fix for when fixing with tab 3 on start (diff) | |
download | vmchooser2-2f967194db5a4b7ce667a1c30baab800e78213fb.tar.gz vmchooser2-2f967194db5a4b7ce667a1c30baab800e78213fb.tar.xz vmchooser2-2f967194db5a4b7ce667a1c30baab800e78213fb.zip |
dialog.cpp: only close WM after hiding window
-rw-r--r-- | src/dialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp index 4f10897..e43d950 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -161,7 +161,6 @@ void Dialog::on_treeView_doubleClicked(const QModelIndex& index) // Run session if (s->run()) { - WindowManager::stopOwnInstance(); // Run session start script if the session could be initialized successfully if (QFile::exists(SESSION_START_SCRIPT)) { // Use the current environment variables and add the necessary @@ -208,6 +207,9 @@ void Dialog::on_treeView_doubleClicked(const QModelIndex& index) UserConfig::setNewsHelpOpen(!ui->helpBox->isHidden()); centerTimer_->stop(); // Stop the auto-center/auto-quit timer, so we don't kill the session :> setVisible(false); + // Stopping the window manager has to be done after hiding our window, + // or it might still be shown in some Xsessions (e.g. gnome-shell). + WindowManager::stopOwnInstance(); } else { QMessageBox::critical( this, trUtf8("vmchooser"), |