QOL: Paint terminal win32 host background so it looks like the launch profile? #7702

Closed
opened 2026-01-31 01:10:44 +00:00 by claunia · 16 comments
Owner

Originally created by @letmaik on GitHub (Apr 26, 2020).

Environment

Windows build number: 10.0.18363.778
Windows Terminal version (if applicable): 0.11.1121.0

Steps to reproduce

Start Terminal and observe the short gray-to-default-profile-background-color flicker before the shell is loaded. Close Terminal and observe the same in reverse.

Expected behavior

There should be no flickering. When starting, the background of the "empty" shell area should be the same color as the default profile. When closing, the shell area should use the background color of the currently active profile/shell.

Actual behavior

The "empty" shell area is always gray, which means it transitions very quickly from gray to (typically) black when the default profile shell is displayed. Similarly when closing Terminal.

Originally created by @letmaik on GitHub (Apr 26, 2020). # Environment ```none Windows build number: 10.0.18363.778 Windows Terminal version (if applicable): 0.11.1121.0 ``` # Steps to reproduce Start Terminal and observe the short gray-to-default-profile-background-color flicker before the shell is loaded. Close Terminal and observe the same in reverse. # Expected behavior There should be no flickering. When starting, the background of the "empty" shell area should be the same color as the default profile. When closing, the shell area should use the background color of the currently active profile/shell. # Actual behavior The "empty" shell area is always gray, which means it transitions very quickly from gray to (typically) black when the default profile shell is displayed. Similarly when closing Terminal.
Author
Owner

@WSLUser commented on GitHub (Apr 27, 2020):

Probably related to this: https://github.com/microsoft/terminal/pull/5277

@WSLUser commented on GitHub (Apr 27, 2020): Probably related to this: https://github.com/microsoft/terminal/pull/5277
Author
Owner

@letmaik commented on GitHub (Apr 27, 2020):

Really? Why do you think so?

@letmaik commented on GitHub (Apr 27, 2020): Really? Why do you think so?
Author
Owner

@zadjii-msft commented on GitHub (Apr 27, 2020):

Yea that merged literally 3 days ago, it hasn't actually been shipped to anyone yet

@zadjii-msft commented on GitHub (Apr 27, 2020): Yea that merged literally 3 days ago, it hasn't actually been shipped to anyone yet
Author
Owner

@zadjii-msft commented on GitHub (Apr 27, 2020):

@letmaik do you mean a gray window like this?
image

@zadjii-msft commented on GitHub (Apr 27, 2020): @letmaik do you mean a gray window like this? ![image](https://user-images.githubusercontent.com/18356694/80398046-adb71300-887c-11ea-96a4-bd6836803fbf.png)
Author
Owner

@letmaik commented on GitHub (Apr 27, 2020):

This is what the moment looks like when it starts/exits:
grafik

@letmaik commented on GitHub (Apr 27, 2020): This is what the moment looks like when it starts/exits: ![grafik](https://user-images.githubusercontent.com/530988/80401208-df979c00-88b3-11ea-8e52-bddde92631e6.png)
Author
Owner

@WSLUser commented on GitHub (Apr 27, 2020):

Oh, I thought it was part of the .11 release. So much for it being obvious.

@WSLUser commented on GitHub (Apr 27, 2020): Oh, I thought it was part of the .11 release. So much for it being obvious.
Author
Owner

@dreadnaut commented on GitHub (May 4, 2020):

This happens for me as well, in the most recent release but also in previous ones. The terminal window appears initially with a white background:
image
then the correct theme background is applied. Both with standard decorations, or with tabs in the titlebar. The same when closing the window.

Switching the system's "default app mode" to dark does not change the flash colour: it's still white. I don't use acrylic in Terminal, and transparencies are disabled at system level.

@dreadnaut commented on GitHub (May 4, 2020): This happens for me as well, in the most recent release but also in previous ones. The terminal window appears initially with a white background: ![image](https://user-images.githubusercontent.com/584584/80997799-c2c21200-8e39-11ea-8fc6-c52d9d1673e2.png) then the correct theme background is applied. Both with standard decorations, or with tabs in the titlebar. The same when closing the window. Switching the system's "default app mode" to dark _does not_ change the flash colour: it's still white. I don't use acrylic in Terminal, and transparencies are disabled at system level.
Author
Owner

@DHowett commented on GitHub (May 19, 2020):

Thanks for writing this all up!

I think it would be a nice quality of life improvement if we were to paint the window in a color closer to the one it'll eventually be filled with.

@dreadnaut your issue seems different, somehow... that titlebar doesn't look familiar to me (the standard Windows one is narrower, and the custom one we draw has different caption buttons ...)

@DHowett commented on GitHub (May 19, 2020): Thanks for writing this all up! I think it would be a nice quality of life improvement if we were to paint the window in a color closer to the one it'll eventually be filled with. @dreadnaut your issue seems different, somehow... that titlebar doesn't look familiar to me (the standard Windows one is narrower, and the custom one we draw has different caption buttons ...)
Author
Owner

@DHowett commented on GitHub (May 19, 2020):

(name changed to encompass what I think would be best)

@DHowett commented on GitHub (May 19, 2020): (name changed to encompass what I think would be best)
Author
Owner

@dreadnaut commented on GitHub (May 19, 2020):

@dreadnaut your issue seems different, somehow... that titlebar doesn't look familiar to me (the standard Windows one is narrower, and the custom one we draw has different caption buttons ...)

I use Terminal with acrylic disabled, and

    "alwaysShowTabs" : false,
    "showTabsInTitlebar" : false,

which means I only see the standard Windows titlebar until I open a second tab. If I switch to tabs-in-titlebar, the flash has the same colour. I'd say it's the same issue 🙂

@dreadnaut commented on GitHub (May 19, 2020): > @dreadnaut your issue seems different, somehow... that titlebar doesn't look familiar to me (the standard Windows one is narrower, and the custom one we draw has different caption buttons ...) I use Terminal with acrylic disabled, and ``` "alwaysShowTabs" : false, "showTabsInTitlebar" : false, ``` which means I only see the standard Windows titlebar until I open a second tab. If I switch to tabs-in-titlebar, the flash has the same colour. I'd say it's the same issue 🙂
Author
Owner

@zadjii-msft commented on GitHub (Dec 9, 2021):

I'm gonna also x-ref #11561 here. With the transparency changes in 1.12, the backgound starts as totally transparent, instead of gray/white.

There's also now the possibility that the Terminal is launching:

  • with some profile other than the default profile
  • with multiple tabs & panes, which might complicate this.

So this isn't necessarily straighforward "use the default profile's BG to paint the window".

@zadjii-msft commented on GitHub (Dec 9, 2021): I'm gonna also x-ref #11561 here. With the transparency changes in 1.12, the backgound starts as totally transparent, instead of gray/white. There's also now the possibility that the Terminal is launching: * with some profile other than the default profile * with _multiple_ tabs & panes, which might complicate this. So this isn't necessarily straighforward "use the default profile's BG to paint the window".
Author
Owner

@mentalisttraceur commented on GitHub (Apr 7, 2022):

In case this changes priority at all: getting flashbanged in the eyes like this is the number one thing I know of that makes dark themes unhelpful for some people - if your eyes are sensitive in the right way, light theme is bad and unpleasant but still better than to let your eyes get used to dark only to get sliced across the eyes with a momentary flash.

@mentalisttraceur commented on GitHub (Apr 7, 2022): In case this changes priority at all: getting flashbanged in the eyes like this is the number one thing I know of that makes dark themes unhelpful for some people - if your eyes are sensitive in the right way, light theme is bad and unpleasant but still better than to let your eyes get used to dark only to get sliced across the eyes with a momentary flash.
Author
Owner

@mentalisttraceur commented on GitHub (Apr 7, 2022):

For anyone looking for a slightly better experience, I noticed that if I install WSL Debian, set my default terminal application to Windows Terminal instead of Windows Console Host, and then run Debian, I only get the flash on close rather than on open.

(I presume you'd get the same improvement with any command-line program which indirectly launches Windows Terminal instead of directly, but I haven't checked.)

@mentalisttraceur commented on GitHub (Apr 7, 2022): For anyone looking for a slightly better experience, I noticed that if I install WSL Debian, set my default terminal application to Windows Terminal instead of Windows Console Host, and then run Debian, I only get the flash on close rather than on open. (I presume you'd get the same improvement with any command-line program which indirectly launches Windows Terminal instead of directly, but I haven't checked.)
Author
Owner

@mentalisttraceur commented on GitHub (Apr 7, 2022):

Actually I take that last statement back.

Upon further testing it seems that it's only sometimes fast enough to not do the white-ish flash on launch in those cases, but other times I still get the flash.

Also an interesting effect is that the initial color on start and final color on close are different. The open color seems dimmer, like a gray, while the close color seems closer to a white.

@mentalisttraceur commented on GitHub (Apr 7, 2022): Actually I take that last statement back. Upon further testing it seems that it's only sometimes fast enough to not do the white-ish flash on launch in those cases, but other times I still get the flash. Also an interesting effect is that the initial color on start and final color on close are different. The open color seems dimmer, like a gray, while the close color seems closer to a white.
Author
Owner

@zadjii-msft commented on GitHub (Mar 6, 2024):

You know what, like 8 months ago we started having the HWND be entirely hidden until the window is ready to render. That basically makes this issue moot 😄

@zadjii-msft commented on GitHub (Mar 6, 2024): You know what, like 8 months ago we started having the HWND be entirely hidden until the window is ready to render. That basically makes this issue moot 😄
Author
Owner

@mentalisttraceur commented on GitHub (Mar 6, 2024):

Now that you mention it, I don't remember being bothered by this problem lately.

(I moved to Emacs through gWSL as my daily driver terminal emulator about a year ago, so in those 8 months I've only opened the terminal a handful of times.)

Checking now, I can confirm that this issue seems to no longer happen, on both open and close. Big thanks.

@mentalisttraceur commented on GitHub (Mar 6, 2024): Now that you mention it, I don't remember being bothered by this problem lately. (I moved to Emacs through gWSL as my daily driver terminal emulator about a year ago, so in those 8 months I've only opened the terminal a handful of times.) Checking now, I can confirm that this issue seems to no longer happen, on both open *and close*. Big thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7702