rail: a keyboard-up climb means only a swap, never navigation
This commit is contained in:
parent
7f294a5fa2
commit
c2dcbe7b7f
1 changed files with 41 additions and 13 deletions
|
|
@ -12,10 +12,13 @@
|
|||
// by making it wait 350 ms first. Both are gone, along with the double tap's
|
||||
// `hyprctl` fullscreen (START-HERE §3).
|
||||
//
|
||||
// One exception, and it is the keyboard's: with an OSK up, a pull past a third
|
||||
// detent — further than home, where the handle squares off — swaps the keyboard
|
||||
// (TASK-38). It is deliberately beyond the others because a swap mid-sentence
|
||||
// has to cost a deliberate reach, not a near miss.
|
||||
// One exception, and it is the keyboard's: with an OSK up, the climb means
|
||||
// only the swap — an upward pull past the swap detent swaps the keyboard
|
||||
// (TASK-38), and the navigation stages (multitasking, home) do not exist for
|
||||
// the duration. The keyboard owns the edge it rides on; a swipe that flips an
|
||||
// app into multitasking while the user was mid-sentence was the complaint as
|
||||
// it presented, and the swap detent has to cost a deliberate reach, not a
|
||||
// near miss. Keyboard down, the two swipe modes are the whole of it.
|
||||
//
|
||||
// The upward gesture is progressive, not a single threshold, and the progress
|
||||
// is *published* (`GlobalStates.zonePullProgress`) rather than kept: the real
|
||||
|
|
@ -150,9 +153,9 @@ PanelWindow {
|
|||
// 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
|
||||
// keyboard. Deliberately beyond missionAt: a swap mid-sentence is
|
||||
// disruptive, so it has to be an obviously further pull, not a near-miss of
|
||||
// Mission Control.
|
||||
// keyboard. It is the ONLY stage while a keyboard is up — the nav stages
|
||||
// are gated off (see `dragStage`), so the pull is a deliberate, exclusive
|
||||
// reach rather than a near-miss of Mission Control.
|
||||
readonly property int swapAt: 300
|
||||
|
||||
// Live upward travel of the in-flight drag (0 while idle, grows as the
|
||||
|
|
@ -162,7 +165,11 @@ PanelWindow {
|
|||
property bool dragging: false
|
||||
|
||||
// Stage the current travel has reached: 0 none, 1 reveal, 2 mission.
|
||||
readonly property int dragStage: dragTravel >= missionAt ? 2
|
||||
// With a keyboard up the navigation stages do not exist — the climb means
|
||||
// only the swap, and an app mid-sentence has no business shrinking under
|
||||
// the thumb (the drag is the keyboard's then, not the canvas's).
|
||||
readonly property int dragStage: GlobalStates.oskOpen ? 0
|
||||
: dragTravel >= missionAt ? 2
|
||||
: dragTravel >= revealAt ? 1 : 0
|
||||
|
||||
// Stage 3, keyboard only. Kept out of dragStage so none of the existing
|
||||
|
|
@ -376,10 +383,19 @@ PanelWindow {
|
|||
// Nothing is scaled below 0.6: past that the window is a thumbnail
|
||||
// and its own inverse-mapped touch targets stop being findable if
|
||||
// the drag is abandoned there.
|
||||
//
|
||||
// The pose is a navigation gesture's transition. With a keyboard
|
||||
// up the climb is the swap pull instead — a scale that starts while
|
||||
// the finger is still short of the swap detent is the app "going
|
||||
// into multitasking" for a gesture that is not about multitasking,
|
||||
// which is exactly the wrong read (observed 2026-08-06). The
|
||||
// keyboard's climb touches nothing; only the swap commits.
|
||||
if (!GlobalStates.oskOpen) {
|
||||
const progress = Math.min(1.0, rail.dragTravel / Math.max(1, rail.missionAt))
|
||||
GlobalStates.zonePullProgress = progress
|
||||
ViewtopControl.poseActiveZone(1.0 - 0.4 * progress)
|
||||
}
|
||||
}
|
||||
|
||||
// End an upward pull, one way or the other.
|
||||
//
|
||||
|
|
@ -433,7 +449,15 @@ PanelWindow {
|
|||
// Upward: pick the committed stage from travel, then let a fast
|
||||
// flick promote it one step (a quick short throw still reaches
|
||||
// Mission Control).
|
||||
if (travel >= rail.revealAt || (speed >= flickSpeed && travel >= rail.tapSlop)) {
|
||||
//
|
||||
// Navigation is OFF while the keyboard is up: the climb means only
|
||||
// the swap, and a pull that fell short of the swap detent is an
|
||||
// abandoned pull, not a mission-to-home gesture. A short swipe that
|
||||
// flipped the app into multitasking was the keyboard-swap complaint
|
||||
// as it actually presented (observed 2026-08-06) — the swap path
|
||||
// above is the *only* thing a keyboard-up climb can commit.
|
||||
if (!GlobalStates.oskOpen
|
||||
&& (travel >= rail.revealAt || (speed >= flickSpeed && travel >= rail.tapSlop))) {
|
||||
let stage = travel >= rail.missionAt ? 2 : travel >= rail.revealAt ? 1 : 0
|
||||
if (speed >= flickSpeed && stage < 2)
|
||||
stage += 1
|
||||
|
|
@ -474,7 +498,11 @@ PanelWindow {
|
|||
// a fourth thing on the same 32 px strip, which is three gestures
|
||||
// competing for the one region a thumb rests in — and one of them
|
||||
// could only resolve by making the other wait 350 ms first.
|
||||
if (travel > tapSlop)
|
||||
//
|
||||
// Not while the keyboard is up: a short climb there is a swap pull
|
||||
// that fell short — a failed attempt at a gesture that exists —
|
||||
// not a failed attempt at one that does not.
|
||||
if (travel > tapSlop && !GlobalStates.oskOpen)
|
||||
maybeNudgeDiscovery()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue