Give the revealed Dock back the pointer that revealed it

The bottom dock came up when the cursor reached the edge and hid again a
quarter-second later with the cursor still sitting there.

The input region has two shapes: a three-pixel strip along the whole edge while
hidden, and a region over the body once revealed. Teaching the dock about left
and right rewrote both, and the bottom case was folded into the branch that
serves a left dock -- x 0. That is right for a dock that hugs the left edge and
wrong for one that is centred on the bottom: the region landed on the left third
of the screen while the pointer that summoned the dock was in the middle. Hover
dropped on the very frame the dock arrived, and the hide timer did the rest.
Approaching from the far left worked, which is the only reason it looked
intermittent rather than broken.

Bottom is centred, so the region starts where the body starts.

Nothing measured the input region, which is why "bottom is unchanged" passed
while bottom was broken -- the contract read the window and the window was
fine. It now probes the mask in both states on all three edges and asserts the
point a hand actually aims at, the middle of the edge the dock lives on, is
still inside the region after the dock arrives. It fails on the old binding
with the coordinates that were wrong.

Claude-Session: https://claude.ai/code/session_01NvgBuSWB5sE43yWmg21ozj
This commit is contained in:
Gabriel Brown
2026-08-20 19:23:02 -04:00
parent 15d54b16f6
commit b6448c9876
2 changed files with 96 additions and 4 deletions
+10 -1
View File
@@ -177,12 +177,21 @@ PanelWindow {
x: {
if (!root.revealed)
return root.position === "right" ? surface.width - root.revealStripHeight : 0;
// A horizontal dock is centred on its edge, so the region has
// to start where the body starts -- starting at 0 puts it over
// the left of the screen while the pointer that summoned the
// dock is in the middle, and the hover drops on the very frame
// the dock arrives. A vertical dock reaches from the body out
// to its own edge, which is x 0 on the left and the body on
// the right.
if (!root.vertical)
return body.x;
return root.position === "right" ? body.x : 0;
}
y: {
if (!root.revealed)
return root.vertical ? 0 : surface.height - root.revealStripHeight;
return root.vertical ? body.y : body.y;
return body.y;
}
width: {
if (!root.revealed)