Repository navigation
Conversation
In a scene copied per monitor (`screens: each`), a named surface with its
own `screens:` read the plain `screen.index`, `.width` and `.height`,
which are copy 0's. A panel sent to the second monitor (`screens:
some_text`) measured the first one, and every loose `let` it shared with
the copies ("the panel is on this copy") was false there. So a shell
could not draw a panel once, on its own surface, instead of in every
copy, where it costs properties per monitor until the scene no longer
fits in 65 536.
Now such a surface reads `NAME.screen.*`, which the render keeps as the
values of the copy on the monitor it is shown on (index -1 where there is
no copy), and a loose `let` that reads per-copy values is read once more
for it, as it is for each copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a scene copied per monitor (
screens: each), a named surface with its ownscreens:(a panel that follows the monitor it was opened on,screens: some_text) read the plainscreen.index,screen.widthandscreen.height, which are copy 0's. On the second monitor it measured the first one, and every looseletit shared with the copies, likeif(panel_on == screen.index, 1, 0), was false there.That made it impossible to draw a big panel once, on a surface of its own, instead of in every copy. A shell with a settings panel (Vitreus) pays for that panel in each copy: three monitors went over the 65 536 properties a scene can hold, and the bar did not start at all. With this, its settings can move to one surface: about 22 000 properties per copy go down to about 15 400.
What changes
screens: eachcopies) getsscreen.index,.widthand.heightaliased to facts of its own,NAME.screen.*. A looseletthat reads per-copy values is read once more for it, stored asname#on.NAME, the same way it is read once per copy (name#screenK).screen.K.nameis the monitor the surface is on. On a monitor with no copy, index -1 and the scene'sscreen.width/height. Where those names are is found once per scene load, not every round.Tested
a_named_surface_beside_the_copies_reads_the_copy_on_its_monitor. It fails without the change (left: [0.0],right: [1.0]).cargo test --release: 197 passed../run-tests.sh: 353 checks, all as expected.pleamar-wm headless, 2 monitors), checked with--say describe: a named surface on HEADLESS-2 reads index 1, its monitor's width, and a sharedletas copy 1 does. Sent to HEADLESS-1 by changing its text, it reads index 0.Written with Claude Code.
🤖 Generated with Claude Code