Merge pull request #1065 from leo78913/gamescope-close-button

This commit is contained in:
Sefa Eyeoglu 2023-06-26 08:45:28 +02:00
parent 20e9bf0e11
commit a25a5a7c9f
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951

View File

@ -224,6 +224,13 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
// disabled until we have an instance selected // disabled until we have an instance selected
ui->instanceToolBar->setEnabled(false); ui->instanceToolBar->setEnabled(false);
setInstanceActionsEnabled(false); setInstanceActionsEnabled(false);
// add a close button at the end of the main toolbar when running on gamescope / steam deck
// FIXME: detect if we don't have server side decorations instead
if (qgetenv("XDG_CURRENT_DESKTOP") == "gamescope") {
ui->mainToolBar->addAction(ui->actionCloseWindow);
}
} }
// add the toolbar toggles to the view menu // add the toolbar toggles to the view menu