From b4a5d21f972258ef0232d2e53892c77c078c80a6 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 26 Jan 2026 23:20:38 -0600 Subject: [PATCH] Fix focusing after closing a dialog --- app/gui/NavigableDialog.qml | 12 +++++------- app/gui/PcView.qml | 4 ---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/app/gui/NavigableDialog.qml b/app/gui/NavigableDialog.qml index a41c011c..934cd013 100644 --- a/app/gui/NavigableDialog.qml +++ b/app/gui/NavigableDialog.qml @@ -1,17 +1,15 @@ import QtQuick 2.0 -import QtQuick.Controls 2.2 +import QtQuick.Controls 2.3 Dialog { - // We should use Overlay.overlay here but that's not available in Qt 5.9 :( - parent: ApplicationWindow.contentItem + modal: true x: Math.round((parent.width - width) / 2) y: Math.round((parent.height - height) / 2) - onAboutToHide: { - // We must force focus back to the last item for platforms without - // support for more than one active window like Steam Link. If - // we don't, gamepad and keyboard navigation will break after a + onClosed: { + // We must force focus back to the last item. If we don't, + // gamepad and keyboard navigation will break after a // dialog appears. stackView.forceActiveFocus() } diff --git a/app/gui/PcView.qml b/app/gui/PcView.qml index 00f0518a..baecbebd 100644 --- a/app/gui/PcView.qml +++ b/app/gui/PcView.qml @@ -289,10 +289,6 @@ CenteredGridView { NavigableMessageDialog { id: pairDialog - - // Pairing dialog must be modal to prevent double-clicks from triggering - // pairing twice - modal: true closePolicy: Popup.CloseOnEscape // don't allow edits to the rest of the window while open