Repository: microsoft/terminal (language: cpp)

Issue:
When UseAcrylic is true in Focused aswell as Unfocused Apearance , changing enableUnfocusedAcrylic at runtime doesn't work
### Windows Terminal version

1.18.1462.0

### Windows build number

10.0.22621.0

### Other Software

_No response_

### Steps to reproduce


![image](https://github.com/microsoft/terminal/assets/15957528/99e28241-2a31-48ef-b051-0628df1694d7)

Change  `"compatibility.enableUnfocusedAcrylic"` at runtime to false





### Expected Behavior

The unfocused Terminal becomes Solid black 

### Actual Behavior

It stays acrylic


Discussion / hints:

Fix patch:
diff --git a/src/cascadia/TerminalControl/TermControl.cpp b/src/cascadia/TerminalControl/TermControl.cpp
index d26adcaead6..6582d680a7f 100644
--- a/src/cascadia/TerminalControl/TermControl.cpp
+++ b/src/cascadia/TerminalControl/TermControl.cpp
@@ -733,17 +733,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
             if (acrylic == nullptr)
             {
                 acrylic = Media::AcrylicBrush{};
-
-                if (_core.Settings().EnableUnfocusedAcrylic())
-                {
-                    acrylic.BackgroundSource(Media::AcrylicBackgroundSource::Backdrop);
-                }
-                else
-                {
-                    acrylic.BackgroundSource(Media::AcrylicBackgroundSource::HostBackdrop);
-                }
             }
 
+            const auto backdropStyle =
+                _core.Settings().EnableUnfocusedAcrylic() ? Media::AcrylicBackgroundSource::Backdrop : Media::AcrylicBackgroundSource::HostBackdrop;
+            acrylic.BackgroundSource(backdropStyle);
+
             // see GH#1082: Initialize background color so we don't get a
             // fade/flash when _BackgroundColorChanged is called
             acrylic.FallbackColor(bgColor);


Test patch: