terminal
terminal copied to clipboard
Starting WT momentarily shows a black titlebar
Windows Terminal version (or Windows build number)
10.0.19043.1288 1.12.2922.0
Other Software
No response
Steps to reproduce
Start WT.
Expected Behavior
The GUI should start without showing a glitched black title bar, just as it did in v1.11.
Actual Behavior
It shows a black title bar for a few milliseconds. See below:
My settings.json is the same as before I upgraded (through Store).
showerthought: we could have a solid BG for the TerminalPage
until initialization is completed, and then drop out the bg. That might obscure the titlebar until the rest of the content initializes.
Note to self - that didn't work. Might need to do this higher up in Win32 land. Might need to actually start with the window painted with some color, then paint it all with BLACK_BRUSH
You also can't just hack this by immediately creating the window without WS_EX_NOREDIRECTIONBITMAP
and then later turning that style on. You have to create the window with WS_EX_NOREDIRECTIONBITMAP
, SetWindowLong
won't work.
see:
- https://stackoverflow.com/questions/40576394/setwindowlong-with-gwl-exstyle-and-ws-ex-noredirectionbitmap
This was something that I noticed with the upgrade to WinUI 2.7, in case that gives any help.
I suspect that this is more due to the changes we made to drop out the back of the window in #11180
Yea, this was definitely regressed in #11180. I've spent enough time on this for this week, but made no real progress. I don't think we can just draw the BG manually in WM_ERASEBKGND
or something, because there is not GDI redirection surface to draw to. my current crazy idea is using CreateSwapChainForHwnd
to create a swapchain for the hwnd, draw the color to that, then make it transparent once the Island is initialized. Not sure I have time to futz with that now though. DirectComposition
might be an easier way, but this tutorial looks... long and maybe more complicated than we need. maybe next DoL.
What we really need is someone who actually understands user32 to come give us an assist on this one.
Some gifs recorded this morning of the issue. No progress to report.
Note to self: maybe we can DWM_CLOAK the window until it's initialized
note to self: tried just setting a BG for the TerminalPage then yanking that after we're initialized. There's still a few frames before the XAML content loads at all. I'd say the cloaking thing felt more polished comparatively.
Whoops, we reverted this and never reopened
From teams:
This is the "empty terminal" animating in thing I mentioned
you likely want to hookup a solid color brush via DComp/WinComp that paints everything some opaque color to avoid this
your swapchain effectively "does not exist" until the first present is finished so this is why you get this behavior