Repository navigation
Conversation
The plan's open pull requests gain #173 (the same issue built separately: the pick beside the Desktop's object, the displays by ID, "Desktop 1" for a label, a pick without a display keeping the last one), and rule 5 says the displays are read again before a stopped capture's restart, as 7cc8bcc does; CLAUDE.md's entry says both and the merge of main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…exactly The plan's #173 section now says how the two differ (the pick's key beside or inside the Desktop's object, "Desktop 2" against "1 of 2", a pick without a display, a display gone, a pick during a restart, two quick taps), what backs each, and which should land: this branch, which does what Noah decided on #91 ("when there is another one it says so") and keeps devices from before on the main display. Rule 3 says a pick that named no display keeps meaning the main one through a change of the main display; the wire section says why desktopDisplay sits beside the list rather than as a flag on each entry (#66's shape). The checks README says which change brought the check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marliechorgan
left a comment
There was a problem hiding this comment.
Thanks for picking up #91. I ran this on a Mac with three displays: a MacBook Pro's built-in screen (main) under two identical BenQ MA270U monitors. Two things came up, and both are fixed in addhumal#2, which goes into this branch.
1. A pick that lands mid-switch is dropped, but the device is told it happened. The Desktop started on display 4, display 2 was picked, then display 1 50 ms later. The host streamed two BenQ pipelines (3840×2160) and never the built-in screen, yet its window list said desktopDisplay=1. Input and the pointer read the same catalog.display, so taps land on a screen the device isn't showing. It happened in 4 of 4 runs. The cause is that pickDesktop moves catalog.display at once (WindowCatalog.swift:99), while select's defer drops the queued .desktop because pick != active is false (StreamCoordinator.swift:1237).
2. The numbers follow display IDs, not positions. Here the right-hand BenQ (macOS's "(2)") is ID 2 and the left-hand one ("(1)") is ID 4, so the button calls the left monitor Desktop 3, and tapping steps right, then left (WindowCatalog.swift:278).
The linked PR has the repro (a desktop:ID pick for sillclient.py), a fix for both, and checks built on this layout. Under the ID order those checks fail. With #173 and the fix merged onto main, all 46 pure checks pass.
Two smaller points about the description:
- The default Desktop changes for everyone with more than one display, from
displays.firstto the main display. I think that's better, but users will notice it, so it deserves a line. preferMainDisplayis now written but never read, and its comment no longer holds.
|
Thanks @marliechorgan for testing this on a 3-display setup and putting together addhumal#2! Merged addhumal#2 into |
…ty#91) On a Mac with two displays or more the Desktop button reads "Desktop 1", "Desktop 2"…, and a tap while the Desktop streams moves it to the next display (left to right, then top to bottom, wrapping; never Sill's virtual display). Noah's decision on Saffsanity#91: the tapping method. - Wire (additive): kind 47 nextDisplay (empty), sent only to a host whose window list says desktopDisplays 2 or more; WindowList.desktopDisplays and desktopDisplay. 45 and 46 are held by open pull requests. - Host: the next display is worked out from the host's own newest look and kept by the display's UUID (a new ID after a sleep is the same display); input and the pointer land on the display the capture runs on, not the one just chosen; a Desktop whose display moves under it restarts there; a display that does not stream sends the Desktop back to the one it was on; the Mac's pointer goes to the new display's centre. One log line. - Device: StreamClient.tapDesktop(); VoiceOver's "Display 2 of 3" and hint. - DesktopDisplays (pure), checked in Tests/checks/desktop-displays (56 checks, 31 mutants); compatibility, display-wake and pointer-control extended for kind 47. Supersedes this pull request's earlier version.
e257c9b to
a3c0b4a
Compare
…ps no display Conflicts, each kept both sides: the CI mutants matrix (desktop-displays added to main's list), WindowList's new fields (desktopDisplays and desktopDisplay beside locked and offConsole), listMessage (the display fields before LockPolicy.list), StreamClient's window list handling. With main's locked Mac (LockPolicy): a locked list carries no desktopDisplays or desktopDisplay, so a device sends no kind 47 and learns nothing of the Mac's screens; kind 47 is refused as a window pick is (LockPolicy.Request.nextDisplay); the host checks the lock again before it steps and before it moves the pointer, and the automatic restart leaves the placeholder to LockPolicy. lock-policy 540 checks, 141 of 141 mutants (3 new); run-all.sh all 64; swift build -c release and the three iOS builds, only the known warnings.
|
@Saffsanity this is ready for your review: tap Desktop again for the next monitor (#91, your tapping method). It's reworked from main, and merged with main's locked Mac. Decisions to confirm:
Untested, for you: on a Mac with two or three monitors:
The pure rules are checked ( |
|
Merging this beside #173 / #200: they conflict only in how the Desktop picks its display. A tested merge of the two is ready on addhumal:reconcile-173-200, for whichever lands second.
|
|
please merge this, I tried it on my machine with 3 external monitors, working well. It would be great if it could provide a list to choose from, but I could work with current solution |
|
Thanks @xiaofeng-han for testing it on three monitors! A list to choose from is in #296: hold the Desktop button and pick a display by name. |
Closes #91.
Reworked from main (e4d3034), and merged with main at c4a331f (0.6.0, the locked Mac). This replaces the earlier version of this branch.
What it does
On a Mac with two displays or more, the Desktop button reads "Desktop 1", "Desktop 2"…, and tapping it while the Desktop streams moves it to the next display. The order is left to right, then top to bottom, as System Settings › Displays arranges them, wrapping round. Sill's virtual display is never one of them. With one display, or against an older Mac, the button looks and behaves as before. This is the tapping method Noah decided on in #91.
nextDisplay(empty payload), sent only to a host whose window list saysdesktopDisplays2 or more.WindowList.desktopDisplaysanddesktopDisplay(1-based). Kinds 45 and 46 are held by open pull requests (the microphone, the pen, the camera). Older hosts skip kind 47; older devices skip the fields.WindowCatalog,StreamCoordinator):LockPolicy) lists no displays and refuses kind 47 as it refuses a window pick. The host checks the lock again before it steps and before it moves the pointer.lock-policy: 540 checks, 141 of 141 mutants.StreamClient.tapDesktop(),StreamScreen,PortraitStreamScreen): only the Desktop buttons send kind 47. The device's own Desktop requests and gestures still pick the Desktop, so nothing steps by itself. VoiceOver hears "Display 2 of 3" and the hint "Shows the next display."-SillDesktopDisplays 3,2puts the harness's mock on display 2 of 3.Checks
Tests/checks/desktop-displays(new, in CI's mutants matrix): 56 checks and 31 of 31 mutants. It covers the order, the UUID choice, the next display, where input lands, falling back after a failed step, the button's words and tap, and the pointer, with 5,000 random arrangements.compatibility: 159 checks and 36 of 36 mutants (the new fields and kind 47).display-wake: 199 checks and 62 of 62 mutants (kind 47 is not a person at the device, as a pick isn't).pointer-control: 160 checks and 33 of 33 mutants.run-all.sh: all 64 checks pass.swift build -c release: only the CaptureProbe warning. The three iOS builds (Debug and Release for the simulator, Debug for a device) show only the knownStreamClientcapture warning.Tried by others
Untested
Problems found, and how they were fixed
DesktopDisplays.landing).DesktopDisplays.afterStep).