Repository navigation
Conversation
When the island changes display ("Island lives on: the screen under the
cursor", a display plugged in or out, Settings), the window jumped across
in one frame. The island now tucks up into the top edge of the display it
leaves (190 ms), the window moves while it is out of sight, waits for the
new display's pixel ratio to settle, and drops down from the top edge of the
next one with a few px of give (560 ms).
- Changes that come in during a hop run while the island is still away:
one visible hop, ending on the latest display.
- A change that comes in during the drop takes over from where the island is.
- Settings moves the window from Rust before the event: the island then only
drops in.
- Hidden island or reduced motion: it just moves, as before.
The motion is on #root (#island keeps its own transform), and nothing is
left on it once it has landed.
|
Tested on Windows 11 Pro 26H2 with two monitors at different scales (3840×2160 at 150 % main, 1440×2560 portrait at 100 %), Island lives on: the screen under the cursor. Debug build of this PR merged on top of #892 (the one-line conflict in the
One problem: moving the mouse quickly back and forth between the screens can leave the island stuck on the wrong one. It stays there even after the mouse stops (clicking doesn't help), until the cursor changes screens again. Seen mostly with the compact island. I logged the hop to see why (timestamps in ms):
Without the hop, |
When the island changes display (Island lives on: the screen under the cursor, a display plugged in or out, Settings), the window jumps across in one frame. This makes it hop like a notch would.
Changes
island/screenHop.ts(new): the island tucks up into the top edge of the display it leaves (190 ms), the window moves while it is out of sight, waits for the new display's pixel ratio to settle, and drops down from the top edge of the next one with a few px of give (560 ms).#root(#islandkeeps its own transform), with no fill: nothing is left once it has landed.main.ts: thescreen-changedhandler runs throughhopScreens().Validation
npm test: 466 passed.tsc --noEmit,vite build: passed.git diff --check: passed.#892 (Mochi cut off after a monitor change) edits the same
screen-changedhandler: whichever lands second needs a one-line merge.I know CLAUDE.md says existing views stay as they ship unless you ask, so this one is entirely your call — happy to adjust it, or to close it if it isn't the direction you want.