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

This commit is contained in:
Sefa Eyeoglu 2023-06-26 08:45:28 +02:00 committed by GitHub
commit 4d49486cc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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