Watch
1
0
Fork
You've already forked souveraine
0

session: one IPC owner for target 'session', not a load-order coin flip

Session.qml and Lock.qml both registered target 'session'; quickshell keeps
whichever loads first and drops the other. Lock.qml's handler is a strict
superset, so the duplicate goes.
This commit is contained in:
Fimeg 2026-07-26 19:04:14 -04:00
commit 43c1fdbc05

View file

@ -462,26 +462,20 @@ Singleton {
Quickshell.execDetached(["bash", "-c", `${Config.options.apps.taskManager}`]);
}
// Local maintenance clients (notably deploy.sh) need the same truthful
// session projection the shell uses internally. The implementation above
// existed before the IPC seam did; without this handler, callers could
// only guess whether the secure lock was active and a live QML deploy
// could race auto-lock into a session-lock remap crash.
IpcHandler {
target: "session"
function state(): string {
return JSON.stringify(root.state());
}
function inhibit(what: string, reason: string): string {
return JSON.stringify(root.inhibit(what, reason));
}
function uninhibit(cookie: string): string {
return JSON.stringify(root.uninhibit(cookie));
}
}
// NO IpcHandler here. This file used to register `target: "session"` with
// state/inhibit/uninhibit, and Lock.qml registers the same target with a
// strict superset (those three plus capabilities, lock, unlock, suspend,
// hibernate, poweroff, reboot, logout). Quickshell keeps whichever
// registers first and drops the other with a warning:
//
// QML IpcHandler at Session.qml[470:5]: Handler was registered but will
// not be used because another handler is registered for target session
//
// Which one won was load-order, not design — so `session inhibit` and
// `session uninhibit` were reachable or dead depending on the run, and
// deploy.sh's `session state` was riding the same coin flip. Since every
// verb here exists on Lock.qml's handler, the duplicate is removed rather
// than renamed: one target, one owner. Add new session verbs there.
// --- Boot-time IPC audit ------------------------------------------------
// Logs every IPC endpoint the shell exposes at startup. This is a
@ -495,8 +489,10 @@ Singleton {
// lock2 — Lock.qml (lock, unlock, toggleLock)
// dock — Dock.qml (launch, pin, unpin, moveStack, ...)
// sidebar — SidebarLeft.qml / SidebarRight.qml
// session — SessionScreen.qml (session verbs)
// session — Session.qml (this file — state, lock, unlock, suspend, ...)
// session — Lock.qml (the sole owner: state, capabilities, lock,
// unlock, suspend, hibernate, poweroff, reboot, logout,
// inhibit, uninhibit). Session.qml's duplicate was removed
// 2026-07-26; SessionScreen.qml's moved to `sessionMenu`.
// overview — Overview.qml
// keyboard — OnScreenKeyboard.qml
// appInventory — AppInventoryScope.qml