-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Starting WT momentarily shows a black titlebar #11561
Comments
showerthought: we could have a solid BG for the |
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 You also can't just hack this by immediately creating the window without |
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 What we really need is someone who actually understands user32 to come give us an assist on this one. |
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. |
…2979) When we start up, our window is initially just a frame with a transparent content area. We're gonna do all this startup init on the UI thread, so the UI won't actually paint till it's all done. This results in a few frames where the frame is visible, before the page paints for the first time, before any tabs appears, etc. To mitigate this, we're gonna wait for the UI thread to finish everything it's gotta do for the initial init, and _then_ fire our Initialized event. By waiting for everything else to finish (`CoreDispatcherPriority::Low`), we let all the tabs and panes actually get created. In the window layer, we're gonna ~cloak~ just not show the window till this event is fired, so we don't actually see this frame until we're actually all ready to go. **This will result in the window seemingly not loading as fast**, but it will actually take exactly the same amount of time before it's usable. I also experimented with drawing a solid BG color before the initialization is finished. However, there are still a few frames after the frame is displayed before the XAML content first draws, so that didn't actually resolve any issues. * [x] Closes #11561 * [x] Tested manually * [x] I work here. * [x] Accidentally also closes #9053. By switching the initial call from `ShowWindow(SW_SHOW)` to `ShowWindow(SW_SHOWDEFAULT)`, we actually obey the startup info now.
…2979) When we start up, our window is initially just a frame with a transparent content area. We're gonna do all this startup init on the UI thread, so the UI won't actually paint till it's all done. This results in a few frames where the frame is visible, before the page paints for the first time, before any tabs appears, etc. To mitigate this, we're gonna wait for the UI thread to finish everything it's gotta do for the initial init, and _then_ fire our Initialized event. By waiting for everything else to finish (`CoreDispatcherPriority::Low`), we let all the tabs and panes actually get created. In the window layer, we're gonna ~cloak~ just not show the window till this event is fired, so we don't actually see this frame until we're actually all ready to go. **This will result in the window seemingly not loading as fast**, but it will actually take exactly the same amount of time before it's usable. I also experimented with drawing a solid BG color before the initialization is finished. However, there are still a few frames after the frame is displayed before the XAML content first draws, so that didn't actually resolve any issues. * [x] Closes #11561 * [x] Tested manually * [x] I work here. * [x] Accidentally also closes #9053. By switching the initial call from `ShowWindow(SW_SHOW)` to `ShowWindow(SW_SHOWDEFAULT)`, we actually obey the startup info now. (cherry picked from commit 14098d7) Service-Card-Id: 81599073 Service-Version: 1.14
Whoops, we reverted this and never reopened |
From teams:
|
…alization" (#13811) This is a revert of the revert of #12979. We mainly reverted that PR because of an issue where restored windows would grow/shrink slightly on external displays. It was too close to the ship date for that release, so we backed it out wholesale (in #13098). I think I've found the real root of the problem, and fixed it here. The money diff here from the original PR: 4c08b9a...c34495d. Basically, I had put the part where we actually handle the creation of the window into `_AppInitializedHandler`, when we should have left the window to be created in `_HandleCreateWindow` We create it there, _hidden_, and then should only _show_ it in `_AppInitializedHandler`. I'm _NOT_ incorporating the change for #9053. I reverted that bit in 1fac403. I am too worried about that messing with the phwnd that I wanted to get that reviewed and committed atomically, separately. * fixes #11561 * tested manually * I work here
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).
The text was updated successfully, but these errors were encountered: