summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2019-09-24 11:19:58 +0200
committerJonathan Bauer2019-09-24 11:19:58 +0200
commit2f967194db5a4b7ce667a1c30baab800e78213fb (patch)
treee16df77bf83e67dd570d47a4c7e49da2f919bfff
parentFix the fix for when fixing with tab 3 on start (diff)
downloadvmchooser2-2f967194db5a4b7ce667a1c30baab800e78213fb.tar.gz
vmchooser2-2f967194db5a4b7ce667a1c30baab800e78213fb.tar.xz
vmchooser2-2f967194db5a4b7ce667a1c30baab800e78213fb.zip
dialog.cpp: only close WM after hiding window
-rw-r--r--src/dialog.cpp4
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"),