Watch
1
0
Fork
You've already forked souveraine
0

dock lives on zone one; short swipe multitasks, big swipe goes home

This commit is contained in:
Fimeg 2026-08-05 16:17:47 -04:00
commit 277a0d2b32
3 changed files with 65 additions and 10 deletions

View file

@ -72,6 +72,21 @@ Scope { // Scope
}
function computeDockState() {
// Zone one is home, and home has a dock. Casey, 2026-08-05: *"The dock
// should just always be on zone one."*
//
// Checked before everything below because on home it is not a reveal,
// a pulse, or a consequence of nothing being focused it is furniture
// that is simply there, the way the widget space around it is. The
// whole ladder underneath decides when to show a dock that is normally
// absent; on home there is nothing to decide.
//
// The compositor is the authority on which zone is active the shell
// asking `{"op":"workspaces"}` and believing its own copy is the
// second-decider shape so this reads ViewtopControl's last answer and
// treats "unknown" as not-home rather than guessing.
if (ViewtopControl.activeZone === ViewtopControl.homeZone)
return Dock.DockState.Pinned;
if (root.activeMonitorHasFullscreen)
return (GlobalStates.dockRevealed || GlobalStates.dockRevealPulse)
? Dock.DockState.Shown : Dock.DockState.Hidden;

View file

@ -103,11 +103,21 @@ PanelWindow {
// is made of.
// --- Gesture stages -----------------------------------------------------
// Upward travel, in px, at which each stage arms. The drag must climb
// past REVEAL_AT to show the dock and past MISSION_AT to reach Mission
// Control; releasing between the two commits the lower stage.
// Two destinations, not two degrees of one. Casey, 2026-08-05: *"Home page
// has dock visible, swipe up short once to multitasking, big swipe, like
// beyond the bottom 15-20% is the to the home area."*
//
// A short climb arms **multitasking**; a big one past a fifth of the
// panel arms **home**. The dock is no longer a stage at all: it lives on
// zone one permanently, so there is nothing left to reveal.
readonly property int revealAt: 48
readonly property int missionAt: 190
// A share of the panel rather than a pixel count, because "beyond the
// bottom 15-20%" is a proportion of the glass and this rail has to mean the
// same thing on the phone and on a laptop panel. 0.18 sits in the middle of
// what Casey named. The floor keeps it reachable if a tiny output ever
// makes the proportion smaller than the first detent.
readonly property int missionAt: Math.max(revealAt + 60,
Math.round((rail.QsWindow.window?.height ?? 2160) * 0.18))
// TASK-38: one more detent PAST the mission/max stage, armed only while an
// OSK is up, that swaps stevia <-> squeekboard. stevia dropped its terminal
// layout in 0.56.0-9, so this gesture is the only way to reach a terminal
@ -268,12 +278,10 @@ PanelWindow {
return
}
if (stage >= 1) {
// Multitasking only. The dock is not touched here any more: it
// belongs to zone one and is shown by being *there*, not by a
// gesture that reveals it over whatever else is on screen.
GlobalStates.missionControlOpen = !GlobalStates.missionControlOpen
// The dock rides with it, as it did when multitasking lived on
// the long swipe: the two were always shown together and
// splitting them now would be a second change nobody asked for.
GlobalStates.dockSuppressed = false
GlobalStates.dockRevealed = GlobalStates.missionControlOpen
if (GlobalStates.missionControlOpen
&& !Persistent.states.navigation.missionControlDiscovered)
Persistent.states.navigation.missionControlDiscovered = true

View file

@ -44,11 +44,34 @@ Singleton {
property var windows: []
signal windowsChanged_()
// Ask what is open. Answers into `windows`.
// Which zone is in front, as the compositor last reported it. -1 is
// "not asked yet" and is deliberately not 0: home is 0, so defaulting to it
// would make every surface believe it was on home before the first reply.
property int activeZone: -1
property int zoneCount: 0
// Home is zone 0, matching `workspace::HOME_ZONE` in the compositor. Named
// here rather than written as a literal at each call site so the two ends
// of the wire have one place to disagree if it ever moves.
readonly property int homeZone: 0
// Ask what is open, and where we are. Answers into `windows`/`activeZone`.
function refreshWindows() {
root._send({ op: "workspaces" });
}
// The zone is polled rather than pushed: the compositor has no subscription
// for it yet, and a surface that reads a stale zone shows the wrong
// furniture. Two seconds is slow enough to be free and fast enough that the
// dock does not visibly lag a zone change; a push channel would replace
// this and should.
Timer {
interval: 2000
running: true
repeat: true
triggeredOnStart: true
onTriggered: root.refreshWindows()
}
// 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.
@ -208,6 +231,15 @@ Singleton {
root.windows = reply.windows;
root.windowsChanged_();
}
// `active` is an index and 0 is a real, meaningful value
// it is home so this must test for presence, not
// truthiness. `if (reply.active)` would silently ignore
// every report that we are on home, which is the one zone
// anything here cares about.
if (reply.active !== undefined)
root.activeZone = reply.active;
if (reply.count !== undefined)
root.zoneCount = reply.count;
root.succeeded(intent);
}
root._drain();