From 2f967194db5a4b7ce667a1c30baab800e78213fb Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 24 Sep 2019 11:19:58 +0200 Subject: dialog.cpp: only close WM after hiding window --- src/dialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"), -- cgit v1.2.3-55-g7522