Watch
1
0
Fork
You've already forked souveraine
0

split chooser, home reaches the compositor, idle-inhibit comment was backwards

This commit is contained in:
Fimeg 2026-08-05 14:52:48 -04:00
commit b0688bc30b
4 changed files with 130 additions and 12 deletions

View file

@ -38,6 +38,17 @@ Singleton {
signal refused(string intent, string reason)
signal succeeded(string intent)
// What the compositor last said is on the canvas: `[{id, workspace}, ]`.
// Queried, never cached across opens a chooser showing a window that
// closed a minute ago is worse than one that takes a moment to fill.
property var windows: []
signal windowsChanged_()
// Ask what is open. Answers into `windows`.
function refreshWindows() {
root._send({ op: "workspaces" });
}
// Requests waiting on a connection. A queue rather than SessiondPolicy's
// single slot: the sheet can fire two verbs in a row (kill after a close
// that was refused), and dropping the second would be silent.
@ -114,6 +125,19 @@ Singleton {
root.scene("raise", { id: id });
}
// Go to a zone. Not a `scene` intent zones are the canvas, not a surface
// on it, so the compositor serves this as its own op.
//
// "Zone", not "workspace", in everything we name: viewtop's canvas is a
// large scalable space of states rather than Hyprland's numbered desks, and
// the vocabulary is being moved off Hyprland's deliberately. The wire op is
// still spelled `workspace` renaming that is a separate sweep, and doing
// it halfway would leave the shell calling an op the compositor does not
// serve.
function zone(to) {
root._send({ op: "workspace", to: to });
}
function focus(id) {
root.scene("focus", { id: id });
}
@ -165,6 +189,13 @@ Singleton {
root.refused(intent, why);
} else {
root.lastError = "";
// A `workspaces` reply carries the canvas rather than a
// verb's outcome. Captured here so a chooser has something
// real to list instead of a guess at what is open.
if (reply.windows !== undefined) {
root.windows = reply.windows;
root.windowsChanged_();
}
root.succeeded(intent);
}
root._drain();