mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-13 12:52:27 +00:00
Fix focus and rejection of Yes/No dialogs on SL
This commit is contained in:
parent
0aa87aacc6
commit
2e9af8fef0
3 changed files with 12 additions and 4 deletions
|
@ -199,10 +199,7 @@ GridView {
|
|||
NavigableMenuItem {
|
||||
parentMenu: appContextMenu
|
||||
text: model.running ? "Resume Game" : "Launch Game"
|
||||
onTriggered: {
|
||||
appContextMenu.close()
|
||||
launchOrResumeSelectedApp()
|
||||
}
|
||||
onTriggered: launchOrResumeSelectedApp()
|
||||
}
|
||||
NavigableMenuItem {
|
||||
parentMenu: appContextMenu
|
||||
|
|
|
@ -11,6 +11,13 @@ MenuItem {
|
|||
height: visible ? implicitHeight : 0
|
||||
focusPolicy: visible ? Qt.TabFocus : Qt.NoFocus
|
||||
|
||||
onTriggered: {
|
||||
// We must close the context menu first or
|
||||
// it can steal focus from any dialogs that
|
||||
// onTriggered may spawn.
|
||||
parentMenu.close()
|
||||
}
|
||||
|
||||
Keys.onReturnPressed: {
|
||||
triggered()
|
||||
}
|
||||
|
|
|
@ -45,6 +45,10 @@ NavigableDialog {
|
|||
Keys.onReturnPressed: {
|
||||
accept()
|
||||
}
|
||||
|
||||
Keys.onEscapePressed: {
|
||||
reject()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue