test(docks): assert that a dock receives the clicks at any edge #59

Merged
BlackAngelTV merged 1 commits from fix/dock-click-edge into main 2026-12-03 11:02:14 +01:00
Owner

The mouse handling of docked windows had no test: the existing dock tests only checked the regions the layout carves, never which window the clicks are routed to, so a click lost on a right dock could not be caught by the suite.

A hit test helper now places the two windows of a tab with their own areas and returns the window mouse_region() picks, for both orders. A right dock and a left dock must both resolve to the dock, and the layout tests now pin the position of a right dock, which previously only had its width and its containment checked.

Running this against the current tree passes: the right dock is carved against the right edge (measured on a live instance: 40% of a 210 column tab at columns 127 to 210, geometry 1142..1898 with the terminal at 0..1134), and the hit test then finds it. The mirrored clicks of the report therefore do not reproduce here, so this keeps #44 open for a retest on 0.1.16 and pins the behaviour meanwhile.

The mouse handling of docked windows had no test: the existing dock tests only checked the regions the layout carves, never which window the clicks are routed to, so a click lost on a right dock could not be caught by the suite. A hit test helper now places the two windows of a tab with their own areas and returns the window `mouse_region()` picks, for both orders. A right dock and a left dock must both resolve to the dock, and the layout tests now pin the position of a right dock, which previously only had its width and its containment checked. Running this against the current tree passes: the right dock is carved against the right edge (measured on a live instance: 40% of a 210 column tab at columns 127 to 210, geometry `1142..1898` with the terminal at `0..1134`), and the hit test then finds it. The mirrored clicks of the report therefore do not reproduce here, so this keeps #44 open for a retest on 0.1.16 and pins the behaviour meanwhile.
BlackAngelTV added 1 commit 2026-12-03 11:02:06 +01:00
The mouse handling of the docked windows had no test: the existing dock
tests only checked the regions the layout carves, and nothing checked
which window the clicks are routed to, so a click lost on a right dock
could not be caught by the test suite.

The two windows of a tab are now hit tested with their own areas, in both
orders, so the same point on a right dock and on a left dock must resolve
to the dock. The layout tests also pin the position of a right dock, which
previously only had its width and its containment checked.

Refs #44
BlackAngelTV merged commit e39f938a39 into main 2026-12-03 11:02:14 +01:00
BlackAngelTV deleted branch fix/dock-click-edge 2026-12-03 11:02:14 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FWS/FWS-Kitty#59