Watch
1
0
Fork
You've already forked souveraine
0

lock: hoist the lock out of the Config.ready loaders so a reload can adopt

PanelLoader is a LazyLoader gated on Config.ready, behind a second one.
On reload both are shut when quickshell propagates, so LazyLoader has no
item to hand its successor and the new WlSessionLock never adopts the live
compositor lock. Lock is a direct child of ShellRoot now, as the boot-order
doc already asked.

Ungated means Config may not have loaded, and touchKeypad reads false from
the adapter defaults — which would bind the desktop surface on the phone and
cannot be changed once the lock is active. The choice rides the reload too.
This commit is contained in:
Fimeg 2026-07-31 21:25:05 -04:00
commit 5c618f1514
3 changed files with 66 additions and 2 deletions

View file

@ -116,7 +116,38 @@ LockScreen {
}
}
lockSurface: Config.options.lock.touchKeypad ? touchSurfaceComponent : desktopSurfaceComponent
// Which surface, decided WITHOUT waiting for the config file.
//
// `Config.options` is a JsonAdapter, so it answers with its QML defaults
// from the instant it exists — `touchKeypad` reads `false` until `onLoaded`
// flips `ready`. That is survivable at boot, where `initIfReady()` waits for
// `Config.ready` before requesting a lock, and fatal on a reload, where the
// lock is adopted at construction: the surface would bind to the DESKTOP
// keypad on the phone, and `WlSessionLock.surfaceComponent` cannot be
// changed while the lock is active — quickshell qCritical's and keeps the
// old one. The result is a lock screen that will not take your PIN, which
// is the worst of the three failures on this path because you cannot get
// back in.
//
// So the last known-good answer rides through the reload in-process, and
// Config takes over the moment it is genuinely loaded.
PersistentProperties {
id: lockPrefs
reloadableId: "souveraineLockPrefs"
property bool touchKeypad: false
}
Connections {
target: Config
function onReadyChanged() {
if (Config.ready)
lockPrefs.touchKeypad = Config.options.lock.touchKeypad;
}
}
lockSurface: (Config.ready ? Config.options.lock.touchKeypad : lockPrefs.touchKeypad)
? touchSurfaceComponent
: desktopSurfaceComponent
property Component desktopSurfaceComponent: LockSurface {
context: root.context