repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

fix polkit password focus

a023a8d8fc2f35c120cfc46512fc4eea905c5d71

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (2)

quickshell/nuguland/privilege-ui.test.mjs

Modified
11 11 assert.match(surface, /id:\s*commandText/, "privilege surface has dedicated command text");
12 12 assert.match(surface, /elide:\s*Text\.ElideNone/, "command text must not truncate");
13 13 assert.match(surface, /secretInput\.forceActiveFocus\(\)/, "password input is explicitly focused");
14 +assert.match(surface, /id:\s*focusRetry/, "focus retry timer exists for map-time focus races");
15 +assert.match(qml, /id:\s*privilegeSurface/, "privilege surface instance is addressable from PanelWindow");
16 +assert.match(qml, /onVisibleChanged:\s*if \(visible\)\s*Qt\.callLater\(privilegeSurface\.focusSecret\)/, "PanelWindow asks password input for focus after mapping");
14 17 assert.doesNotMatch(surface, /requestIdentityCard/, "debug identity card is not rendered");
15 18 assert.doesNotMatch(surface, /actionId/, "debug polkit action id is not rendered");

quickshell/nuguland/shell.qml

Modified
533 533 right: true
536 + onVisibleChanged: if (visible)
537 + Qt.callLater(privilegeSurface.focusSecret)
536 539 PrivilegeSurface {
540 + id: privilegeSurface
537 542 anchors.fill: parent
538 543 theme: nuguTheme
539 544 privilegeService: privilege
1443 1448 focus: visible
1444 1449 onVisibleChanged: Qt.callLater(root.focusSecret)
1445 1450 Component.onCompleted: Qt.callLater(root.focusSecret)
1452 + Timer {
1453 + id: focusRetry
1455 + interval: 60
1456 + repeat: true
1457 + running: root.visible && root.panelState.active && !secretInput.activeFocus
1458 + onTriggered: root.focusSecret()
1446 1461 Keys.onEscapePressed: event => {
1447 1462 event.accepted = true;
1448 1463 root.cancel();