Skip to content

Fix tab row acrylic mixed-source flicker#20293

Draft
Rokurolize wants to merge 1 commit into
microsoft:mainfrom
Rokurolize:fix-tab-row-acrylic-mixed-source
Draft

Fix tab row acrylic mixed-source flicker#20293
Rokurolize wants to merge 1 commit into
microsoft:mainfrom
Rokurolize:fix-tab-row-acrylic-mixed-source

Conversation

@Rokurolize
Copy link
Copy Markdown

@Rokurolize Rokurolize commented Jun 5, 2026

Note: This PR was prepared with Codex assistance in my local environment. I personally experience the tab-row flickering described in #14384, but the patch authoring, evidence synthesis, and validation notes below were prepared by Codex.

Summary of the Pull Request

When useAcrylicInTabRow and enableUnfocusedAcrylic are both enabled, the tab row should not layer titlebar HostBackdrop acrylic over terminal content that is already using in-app Backdrop acrylic. This changes only that mixed-source tabs-in-titlebar case to use the evaluated solid titlebar/tab-row brush, while preserving the existing HostBackdrop acrylic path for non-mixed cases.

References and Relevant Issues

Closes #14384.

Detailed Description of the Pull Request / Additional comments

TerminalPage.cpp now detects when all of these are true:

  • tab-row acrylic is requested,
  • tabs are shown in the titlebar,
  • the active terminal content is using in-app AcrylicBackgroundSource::Backdrop,
  • and the tab row would otherwise use titlebar AcrylicBackgroundSource::HostBackdrop acrylic.

In that combination, TitlebarBrush is set to a SolidColorBrush using the evaluated tab-row/titlebar color. Existing behavior is retained for titlebar-only acrylic cases and for non-mixed-source cases.

TabTests.cpp adds TabRowAcrylicUsesSolidTitlebarWhenTerminalUsesInAppAcrylic. The test enables tabs in titlebar, tab-row acrylic, unfocused acrylic, profile acrylic, and opacity below 100%, then verifies that after WindowActivated(false) the active terminal background uses Backdrop while the titlebar brush is solid rather than acrylic.

Process note: I converted this PR to Draft after opening it because the Contributor's Guide asks contributors to start with a Draft PR while the approach is discussed. The patch and exact-head validation are included here so maintainers can review the approach with concrete evidence.

Validation Steps Performed

Exact-head Windows-native validation:

  • Branch: Rokurolize:fix-tab-row-acrylic-mixed-source
  • Commit: 8ab20192d085773a6c3fbbe3287334aab9308888
  • Windows-local checkout head matched the expected PR head commit before validation.
  • NuGet package restore for dep\nuget\packages.config passed.
  • Debug x64 Terminal\Tests\TestHostApp solution-target build passed; this built TerminalApp.LocalTests.dll for the hosted local test run.
  • Focused hosted TAEF passed for TerminalAppLocalTests::TabTests::TabRowAcrylicUsesSolidTitlebarWhenTerminalUsesInAppAcrylic.
  • TAEF summary: Total=1, Passed=1, Failed=0, Blocked=0, Not Run=0, Skipped=0.

PR Checklist

  • Closes Tab bar flickering randomly on both stable and preview version #14384
  • Tests added/passed
  • Documentation updated
    • Not applicable: this PR does not add, remove, or rename user-facing settings, commands, localized strings, schema entries, or configuration syntax. It only changes runtime brush selection for an existing combination of showTabsInTitlebar, useAcrylicInTabRow, compatibility.enableUnfocusedAcrylic, profile useAcrylic, and profile opacity.
  • Schema updated
    • Not applicable: the relevant settings already exist in both the settings model and doc/cascadia/profiles.schema.json; this PR does not add or change schema keys.

Avoid layering titlebar HostBackdrop acrylic over terminal content that is already using in-app Backdrop acrylic when tab row acrylic, tabs-in-titlebar, and unfocused acrylic are combined. Add a local TerminalApp test for the mixed-source case.
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jun 5, 2026
@Rokurolize
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@Rokurolize Rokurolize marked this pull request as draft June 5, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue-Bug It either shouldn't be doing this or needs an investigation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tab bar flickering randomly on both stable and preview version

1 participant