1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

settings: try to fix focus loss

This commit is contained in:
bbedward
2025-11-10 09:28:10 -05:00
parent c52df96af9
commit 7b3d2ab85a
6 changed files with 157 additions and 30 deletions

View File

@@ -76,6 +76,11 @@ PanelWindow {
onVisibleChanged: {
if (root.visible) {
opened()
Qt.callLater(() => {
if (shouldHaveFocus) {
focusScope.forceActiveFocus()
}
})
} else {
if (Qt.inputMethod) {
Qt.inputMethod.hide()
@@ -85,6 +90,12 @@ PanelWindow {
}
}
onShouldHaveFocusChanged: {
if (shouldHaveFocus && shouldBeVisible && visible) {
Qt.callLater(() => focusScope.forceActiveFocus())
}
}
Connections {
function onCloseAllModalsExcept(excludedModal) {
if (excludedModal !== root && !allowStacking && shouldBeVisible) {