mirror of
https://github.com/microsoft/terminal.git
synced 2026-11-16 09:20:53 +00:00
Fix the useAcrylicInTabRow flicker (#20881)
This PR fixes the flicker in the tab row when you've got:
```jsonc
{
"showTabsInTitlebar": true,
"useAcrylicInTabRow": true,
"compatibility.enableUnfocusedAcrylic": true,
"profiles": {
"defaults": {
"useAcrylic": true,
"opacity": 80
}
}
}
```
For historical reference:
- #10864
- merged **August 23, 2021.** Added `useAcrylicInTabRow`, with a
separate tab-row brush hardcoded to `HostBackdrop`.
- #11180
- merged **September 20, 2021.** Added transparent window backgrounds.
This removed the XAML opaque backstop and enabled the later in-app
acrylic approach.
- #15923
- merged **September 7, 2023.** Added
`compatibility.enableUnfocusedAcrylic`, defaulting to true, and switched
`TermControl` to `Backdrop`. **It did not update the separate tab-row
brush in `TerminalPage`**. This is when the bug showed up.
We don't need a HWND to bounce foreground off of.
We don't need to recycle brushes.
We just need to know that we now support both HostBackdrop acrylic, XOR
in-app Backdrop acrylic, and make sure to not try to use both at the
same time.
Closes #14384
Closes #20316
Closes #20293
Closes #19705
I'm out.
(cherry picked from commit f472aa97c1)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zhFdkss
Service-Version: 1.25
This commit is contained in:
committed by
Dustin L. Howett
parent
04a70b0625
commit
d87772843a
@@ -4935,7 +4935,11 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
|
||||
const auto acrylicBrush = Media::AcrylicBrush();
|
||||
acrylicBrush.BackgroundSource(Media::AcrylicBackgroundSource::HostBackdrop);
|
||||
// Make sure that we use the same backdrop source as TermControl.
|
||||
// If we don't, it'll cause the same flickering as in GH #14384
|
||||
acrylicBrush.BackgroundSource(_currentWindowSettings().EnableUnfocusedAcrylic() ?
|
||||
Media::AcrylicBackgroundSource::Backdrop :
|
||||
Media::AcrylicBackgroundSource::HostBackdrop);
|
||||
acrylicBrush.FallbackColor(bgColor);
|
||||
acrylicBrush.TintColor(bgColor);
|
||||
acrylicBrush.TintOpacity(0.5);
|
||||
|
||||
Reference in New Issue
Block a user