Skip to content

Fix capture preflight when the surface output arrives late - #410

Merged
devmobasa merged 1 commit into
mainfrom
fix/398-unknown-output-preflight
Oct 9, 2026
Merged

devmobasa merged 1 commit into
mainfrom
fix/398-unknown-output-preflight

Conversation

@devmobasa

@devmobasa devmobasa commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Freeze and Zoom can fail before requesting a screenshot when a toolbar click starts capture without a selected output and the compositor reports that output during the suppression barrier. The saved layout becomes stale, but the previous retry rule rejected requests whose original output was unknown.

Allow one bounded preflight retry on the selected capture backend. An unbound request waits for its first active output and settled geometry, then repeats the suppression barrier with a fresh generation. Retain the original request and keyboard policy; loss or replacement of a bound output remains terminal. Direct backends require only their active-output geometry, while portal retries require complete desktop geometry.

Track all entered outputs so a neighbour leaving or the selected output re-entering preserves the overlay's source. Explicit monitor-switch targets remain sticky; provisional XDG configure guesses yield to the compositor's first enter. Add output/layout/retry diagnostics under wayscriber::capture_diagnostics and document the existing overlay file logs.

Regression coverage drives toolbar events through both hidden frames and verifies capture actually starts on the original backend, including direct backends with no portal. It also covers repeated enters during settling, late GTK acknowledgements, bounded output discovery, output loss/switches, and XDG configure guesses.

Validation:

  • Formatting and git diff --check pass.
  • Workspace Clippy with all targets and -D warnings passes with both all features and no default features.
  • Library suites pass with --test-threads=1: 5,409 all-feature tests and 5,204 no-default-feature tests.
  • The C# repository checks, all 181 tool tests, and all 30 Rust repository guards pass.

The repository protocol tests cover the reported interleaving. The reporter's physical KWin mixed-scale setup still needs a retest.

Refs #398 and the remaining toolbar-path report.

@devmobasa
devmobasa merged commit 91559a5 into main Oct 9, 2026
3 checks passed
@devmobasa
devmobasa deleted the fix/398-unknown-output-preflight branch October 10, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant