Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Must the window be white before it's painted? #10464

Closed
vefatica opened this issue Jun 20, 2021 · 9 comments
Closed

Must the window be white before it's painted? #10464

vefatica opened this issue Jun 20, 2021 · 9 comments
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@vefatica
Copy link

Description of the new feature/enhancement

Let the user pick the color of the window before it's painted.

Here when I start WindowsTerminal, it flashes completely bright white before it's painted black. It's only a split second, but it's very annoying.

Proposed technical implementation details (optional)

I wrote a crude GUI app (not my forte) to play with this. I found that I could control the initial background color of the window by setting WNDCLASS::hbrBackground before registering the class. I used the canned (HBRUSH) COLOR_WINDOWTEXT which happened to be black. I suppose I could have created my own HBRUSH.

I'd like the window not to be conspicuously COLOR_A (white here) when it's first shown, only to become COLOR_B (black here) a split second later. If there were a global setting in WindowsTerminal, you might make lots of folks happy.

Many apps exhibit this behavior. I looked and googled for a while and couldn't find a Windows setting for the default color of a newly-shown window. White is what you get when you use wc.hbrBackground = nullptr. Does anyone know if I change this color system-wide?

  • Vince
@vefatica vefatica added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jun 20, 2021
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 20, 2021
@mdtauk
Copy link

mdtauk commented Jun 20, 2021

Ideally this plain window colour would match the chosen theme, so light grey for Light Theme, and dark grey for Dark Theme.

@DHowett
Copy link
Member

DHowett commented Jun 21, 2021

Ideally this plain window colour would match the chosen theme, so light grey for Light Theme, and dark grey for Dark Theme.

This is the problem actually 😄

The plain window color matches the OS theme. It's bright when the OS is set to be bright, and it's dark when the OS is set to be dark.

Since it's only meant to be seen for a few milliseconds, we should probably set it to be the active background color of the first-launched profile.

@vefatica
Copy link
Author

If this is what you mean, I'm already at dark.

image

Most apps show a white window momentarily. Office apps don't.

@mdtauk
Copy link

mdtauk commented Jun 21, 2021

Ideally this plain window colour would match the chosen theme, so light grey for Light Theme, and dark grey for Dark Theme.

This is the problem actually 😄

The plain window color matches the OS theme. It's bright when the OS is set to be bright, and it's dark when the OS is set to be dark.

Since it's only meant to be seen for a few milliseconds, we should probably set it to be the active background color of the first-launched profile.

I guess you can't read the chosen theme from the settings before the Window starts to paint?

@DHowett
Copy link
Member

DHowett commented Jun 21, 2021

Nah, we actually have to load the settings so that we may size the window properly. Ideally we would paint the top in the theme color and the bottom in terminal color before everything loads, to make it a little more ~ ~ seamless ~ ~.

@vefatica
Copy link
Author

I'm talking about what happens before WT does any painting, i.e., at ShowWindow time. If hbrBackground is specified in the registered WNDCLASS struct, it'll be used when you use ShowWindow. You can always get rid of it, later, with SetClassLongPtr and GCLP_HBR_BACKGROUND ... even make it NULL. Are we on the same wavelength?

@DHowett
Copy link
Member

DHowett commented Jun 21, 2021

I'm talking about what happens before WT does any painting, ... Are we on the same wavelength?

Yes, we are.

@zadjii-msft zadjii-msft added Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Jul 6, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 6, 2021
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Jul 6, 2021
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jul 6, 2021
@zadjii-msft
Copy link
Member

Oh my gosh, this is already on the backlog. Look at that.

/dup #5572

@ghost
Copy link

ghost commented Aug 4, 2021

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Aug 4, 2021
@ghost ghost added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Aug 4, 2021
@zadjii-msft zadjii-msft removed this from the Terminal Backlog milestone Aug 4, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

4 participants