shell: stop gating the dock on a flag the keyboard flaps
Suppressing the dock whenever oskOpen was true, above effectivePinned so it applied in every state, hid the dock permanently on the device. oskOpen is not "the keyboard is on screen". GlobalStates' own comment says squeekboard hides itself whenever input-method focus drops and that a hold re-asserts it, and the journal shows exactly that: self-showed / self-hid every couple of seconds, settling at Visible=true with no keyboard in front of the user. Gating a persistent surface on a flag that flaps turns a cosmetic overlap into a dock nobody can reach. The empty-desktop check keeps its oskOpen term, where it always was: a spuriously-true flag there costs a reveal that was cosmetic anyway, which is a different price from hiding a pinned dock. The real signal is the keyboard's exclusive zone, which the compositor already applies — an unpinned dock declares zone 0 and is placed above the keyboard for free, the same mechanism that fixed the pill. The pinned case, where both reserve space and the reservations stack, wants fixing where the zones are arbitrated.
This commit is contained in:
parent
ca44b0be2a
commit
c21bd1d7d9
1 changed files with 24 additions and 19 deletions
|
|
@ -79,24 +79,26 @@ Scope { // Scope
|
|||
// glance at the dock while the keyboard is up.
|
||||
if (GlobalStates.dockRevealPulse)
|
||||
return Dock.DockState.Shown;
|
||||
// The keyboard owns the bottom edge, pinned or not.
|
||||
// NOT gated on `oskOpen` here, and that is the point.
|
||||
//
|
||||
// This check used to live below `effectivePinned` and inside the
|
||||
// empty-desktop branch only, so a PINNED dock ignored the OSK entirely
|
||||
// and sat under the keyboard — "the dock is still always showing with
|
||||
// keyboard". Meanwhile DockManifest.dockState() has always reported
|
||||
// "suppressed-by-osk" whenever oskOpen, and _blockReason() refuses
|
||||
// mutations with "osk-open": the manifest promised a suppression the
|
||||
// dock did not perform, so the agent's view of the screen and the
|
||||
// screen disagreed. Same shape as the pill layerrule in
|
||||
// INTERFACE-ARCHITECTURE — a documented guarantee the code does not
|
||||
// enforce.
|
||||
// Suppressing the dock whenever `oskOpen` was true — above
|
||||
// `effectivePinned`, so it applied in every state — hid the dock
|
||||
// PERMANENTLY on the device. `oskOpen` is not "the keyboard is on
|
||||
// screen": GlobalStates' own comment says squeekboard hides itself
|
||||
// whenever input-method focus drops and a hold re-asserts it, and the
|
||||
// journal shows exactly that — self-showed / self-hid every couple of
|
||||
// seconds, ending in `Visible=true` with no keyboard in front of the
|
||||
// user. Gating a persistent surface on a flag that flaps turns a
|
||||
// cosmetic overlap into a dock nobody can reach.
|
||||
//
|
||||
// The real signal is the keyboard's exclusive zone, which the
|
||||
// compositor already applies: an unpinned dock declares zone 0 and is
|
||||
// placed above the keyboard for free, the same mechanism that fixed the
|
||||
// pill. What remains is the PINNED case, where the dock reserves space
|
||||
// of its own and the two reservations stack. That wants fixing where
|
||||
// the zones are arbitrated, not by reading a D-Bus property the
|
||||
// keyboard flaps at us.
|
||||
//
|
||||
// Below the pulse deliberately: an explicit reveal is the one thing
|
||||
// that outranks the keyboard, because glancing at the dock while
|
||||
// typing is exactly what it is for.
|
||||
if (GlobalStates.oskOpen)
|
||||
return Dock.DockState.Hidden;
|
||||
// Rail swipe-down dismissed a visible dock; swipe up brings it back.
|
||||
if (GlobalStates.dockSuppressed)
|
||||
return Dock.DockState.Hidden;
|
||||
|
|
@ -104,9 +106,12 @@ Scope { // Scope
|
|||
return Dock.DockState.Pinned;
|
||||
if (root.previewShowing)
|
||||
return Dock.DockState.Shown;
|
||||
// Empty desktop (nothing focused) reveals the dock. The OSK is handled
|
||||
// above now, for every state rather than only this one.
|
||||
if (!ToplevelManager.activeToplevel?.activated)
|
||||
// Empty desktop (nothing focused) reveals the dock, unless the OSK took
|
||||
// the bottom edge. Kept here, where it was: on an empty desktop a
|
||||
// spuriously-true `oskOpen` costs a reveal that would have been
|
||||
// cosmetic anyway, which is a very different price from hiding a pinned
|
||||
// dock the user relies on.
|
||||
if (!GlobalStates.oskOpen && !ToplevelManager.activeToplevel?.activated)
|
||||
return Dock.DockState.Shown;
|
||||
return Dock.DockState.Hidden;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue