summaryrefslogtreecommitdiffstats
path: root/src/dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialog.cpp')
-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"),