mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
Fix focus and rejection of Yes/No dialogs on SL
This commit is contained in:
+1
-4
@@ -199,10 +199,7 @@ GridView {
|
|||||||
NavigableMenuItem {
|
NavigableMenuItem {
|
||||||
parentMenu: appContextMenu
|
parentMenu: appContextMenu
|
||||||
text: model.running ? "Resume Game" : "Launch Game"
|
text: model.running ? "Resume Game" : "Launch Game"
|
||||||
onTriggered: {
|
onTriggered: launchOrResumeSelectedApp()
|
||||||
appContextMenu.close()
|
|
||||||
launchOrResumeSelectedApp()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
NavigableMenuItem {
|
NavigableMenuItem {
|
||||||
parentMenu: appContextMenu
|
parentMenu: appContextMenu
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ MenuItem {
|
|||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
focusPolicy: visible ? Qt.TabFocus : Qt.NoFocus
|
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: {
|
Keys.onReturnPressed: {
|
||||||
triggered()
|
triggered()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ NavigableDialog {
|
|||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
accept()
|
accept()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onEscapePressed: {
|
||||||
|
reject()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user