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

Suspicious remains of previous window borders flash up when closing the window #3222

Closed
egmontkob opened this issue Oct 16, 2019 · 3 comments · Fixed by #3394
Closed

Suspicious remains of previous window borders flash up when closing the window #3222

egmontkob opened this issue Oct 16, 2019 · 3 comments · Fixed by #3394
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@egmontkob
Copy link

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.5.2762.0

Steps to reproduce

Resize the window to smaller, then back to about its original size or even bigger.

Close the window.

Expected behavior

The window should simply disappear.

Actual behavior

For a fraction of a second, tons of horizontal and vertical lines, which look like the border of the window at its previous sizes, are painted inside the window area.

This suspiciously looks like some leftover widgets that don't get properly cleaned up during a resize, potentially consuming various resources (and maybe causing who knows what other problems).

(Could be related to #3207?)

WT-closing

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 16, 2019
@DHowett-MSFT
Copy link
Contributor

So! This is actually because we're only painting the border of our window and leaving the rest unpainted. We've seen DWM do some very strange things when we paint the client area, so this is more reactionary than planned. 😄

@DHowett-MSFT DHowett-MSFT added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. labels Oct 21, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 21, 2019
@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Oct 21, 2019
@DHowett-MSFT DHowett-MSFT added this to the Terminal Backlog milestone Oct 21, 2019
@DHowett-MSFT
Copy link
Contributor

Sticking this one on to #1625. Thanks!

@ghost ghost added the In-PR This issue has a related PR label Nov 2, 2019
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Nov 4, 2019
DHowett-MSFT pushed a commit that referenced this issue Nov 4, 2019
We take the standard window frame except that we remove the top part
(see `NonClientIslandWindow::_OnNcCalcSize`), then we put little 1 pixel
wide top border back in the client area using
`DwmExtendFrameIntoClientArea` and then we put the XAML island and the
drag bar on top.

Most of this PR is comments to explain how the code works and also
removing complex code that was needed to handle the weird cases when the
borders were custom.

I've also refactored a little bit the `NonClientIslandWindow` class.

* Fix DwmExtendFrameIntoClientArea values
* Fix WM_NCHITTEST handling
* Position the XAML island window correctly
* Fix weird colors in drag bar and hide old title bar buttons
* Fix the window's position when maximized
* Add support for dark theme on the frame
* DRY shared code between conhost and new terminal
* Fix drag bar and remove dead code
* Remove dead code and use cached DPI
* Refactor code
* Remove impossible TODO
* Use system metrics instead of hardcoding resize border height
* Use theme from app settings instead of system theme. Improve comments. Remove unused DWM frame on maximize.
* Fix initial position DPI handling bug and apply review changes
* Fix thick borders with DPI > 96

Closes #3064.
Closes #1307.
Closes #3136.
Closes #1897.
Closes #3222.
Closes #1859.
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Nov 4, 2019
@ghost
Copy link

ghost commented Nov 26, 2019

🎉This issue was addressed in #3394, which has now been successfully released as Windows Terminal Preview v0.7.3291.0.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants