microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.44k stars 8.17k forks source link

Acrylic background not applied at startup #16052

Open davidegiacometti opened 10 months ago

davidegiacometti commented 10 months ago

Windows Terminal version

1.18.2681.0

Windows build number

10.0.19045.0

Other Software

No response

Steps to reproduce

Just open Terminal.

In the following gif I am just opening Terminal from the taskbar icon and closing it with ALT+F4 multiple times in a row. Acrylic background is applied only on the first startup (but it's random).

Terminal

Expected Behavior

Acrylic background applied

Actual Behavior

Acrylic background sometimes is not applied

zadjii-msft commented 10 months ago

Here's a possibly goofy question - those times when it starts up without acrylic applied, if you just start typing on the keyboard, does that show up in the Terminal/? My hypothesis is that this is similar to #15479.

Are you launching the Terminal by shift+clicking on the taskbar?

Are there any other terminals running, or are you using compatibility.allowHeadless?

davidegiacometti commented 10 months ago

Here's a possibly goofy question - those times when it starts up without acrylic applied, if you just start typing on the keyboard, does that show up in the Terminal/? My hypothesis is that this is similar to #15479.

The windows does have focus, I can type but in order to see the acrylic background I have to focus another windows and go back to the Terminal one.

Are you launching the Terminal by shift+clicking on the taskbar?

Just a single click. Behavior is the same with SHIFT+Click

Are there any other terminals running, or are you using compatibility.allowHeadless?

Just one single Terminal window. I don't have compatibility.allowHeadless in the settings JSON.

EDIT: note that I have never experienced the focus issue you have linked and this behavior with acrylic has started yesterday after installing 1.18.2681.0.

zadjii-msft commented 9 months ago

Okay my dumb hypothesis is that the window has foreground, but isn't activated for some reason. I'm not even sure that's possible but user32 is dark and full of terrors.

Can you try out the following theme?

"theme": "Test",
"themes":
[
    {
        "name": "Test",
        "tab":
        {
            "background": "terminalBackground",
            "showCloseButton": "always",
            "unfocusedBackground": "#00000000"
        },
        "tabRow":
        {
            "background": "#00ff00ff",
            "unfocusedBackground": "#ff0000ff"
        },
        "window":
        {
            "applicationTheme": "dark",
        }
    },
]

That should aggressively change the color of the titlebar, depending on if the window is activated or not. When you first launch the terminal (when acrylic isn't working), which color do you get?

davidegiacometti commented 9 months ago

After launch image

After switching back to Terminal image

It becomes red when Terminal is unfocused.

SmileEX commented 9 months ago

I have the same problem. Is there any solution

zadjii-msft commented 9 months ago

10.0.19045.0

In the following gif I am just opening Terminal from the taskbar icon and closing it with ALT+F4 multiple times in a row. Acrylic background is applied only on the first startup (but it's random).

Hmm. Okay, here's another dumb question. Is there any other terminal window running when you're doing this? Or even more accurately, any other Terminal process? I wonder if the acrylic isn't getting appropriately applied when we reheat an old window (a la #15424). Like, the theory of that case is

another observation here is that acrylic in the tab row was applied, so it's not just like, a rendering bug. This is more than just the control that's not acrylic, it's acrylic as a whole.


Is there any solution

Not yet. The newly re-written acrylic in Terminal Preview (to allow unfocused acrylic) might help here?

davidegiacometti commented 9 months ago

@zadjii-msft no other process or windows running. I have also experienced this the first time I started Terminal after a reboot (note that auto startup is disabled). Mmm.. I don't think acrylic is applied when the bug is hit (first post gif).

Is this that hard to reproduce for the team? A few weeks ago I tried to debug it in a local build (without success 😭) and with the unfocused acrylic I was able to see the issue only in the title bar sometimes.

bingloo commented 9 months ago

I also had this issue after the Windows 11 app store update yesterday. default set "cmd", When running the bat file, reproduce this issue 100%. version: 1.18.2822.0

tavrez commented 5 months ago

This looks fixed in v1.19.10302.0 for me, however tab row is still affected (probably related to #16661)

revanmj commented 5 months ago

This looks fixed in v1.19.10302.0 for me, however tab row is still affected (probably related to #16661)

Well, I got that issue since this update and never had it before.

Same as above - just launch the Terminal (in my case from Start menu) and it doesn't have Acrylic background until I switch to a different window and back (once in a while just switching to different window will apply Acrylic).

So far it is 100% reproducible, ever since installing v1.19.10302.0 the app never launched with Acrylic applied right from the launch. Have this issue on two computers (laptop and desktop), both with Win11 23H2.

revanmj commented 5 months ago

This looks fixed in v1.19.10302.0 for me, however tab row is still affected (probably related to #16661)

Well, I got that issue since this update and never had it before.

Same as above - just launch the Terminal (in my case from Start menu) and it doesn't have Acrylic background until I switch to a different window and back (once in a while just switching to different window will apply Acrylic).

So far it is 100% reproducible, ever since installing v1.19.10302.0 the app never launched with Acrylic applied right from the launch. Have this issue on two computers (laptop and desktop), both with Win11 23H2.

OK, turns out that latest version started somehow interfering with Mica for Everyone. After I added Terminal process to the blocklist in Mica for Everyone, Acrylic is now properly applied on startup (this was not needed before latest stable).

zadjii-msft commented 1 month ago

you know what? this may be related to #16745

Another user reported that things got better after adding "compatibility.enableUnfocusedAcrylic": false to the global settings (i.e. next to useAcrylicInTabRow) (then rebooting the Terminal).