From 7f38a67ede593a6ae95ae5af88d1f3a73713ed1b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 3 Apr 2019 21:13:12 -0700 Subject: [PATCH] Fix brown-paper-bag bug in 948910bfa2 --- app/gui/AppView.qml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/gui/AppView.qml b/app/gui/AppView.qml index 203e8281..3a4e18ae 100644 --- a/app/gui/AppView.qml +++ b/app/gui/AppView.qml @@ -198,15 +198,25 @@ GridView { stackView.push(segue) } + onClicked: { + // Only allow clicking on the box art for non-running games. + // For running games, buttons will appear to resume or quit which + // will handle starting the game and clicks on the box art will + // be ignored. + if (!model.running) { + launchOrResumeSelectedApp() + } + } + Keys.onReturnPressed: { + // Open the app context menu if activated via the gamepad or keyboard + // for running games. If the game isn't running, the above onClicked + // method will handle the launch. if (model.running) { // This will be keyboard/gamepad driven so use // open() instead of popup() appContextMenu.open() } - else { - launchOrResumeSelectedApp() - } } Keys.onMenuPressed: {