-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
White border at the bottom of the window. #3064
Comments
Can confirm the existence of the issue. Occurs after the update to Windows Insider Preview. |
Chatted with the DWM team, who owns the API we're using to control our non-client drawing. They've got a solution for us, but it'll take some time to implement. |
@DHowett-MSFT In some of my projects, I need to use
So it would look like this:
Plus, you won't see the white lines at the top and bottom when resizing the window anymore. |
@Arush-Agarampur Thanks! @greg904 actually has a comprehensive fix for this in progress in #3394. |
Ahh OK, sorry I didn't see that. First time contributing to a huge project like this... 😅 |
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.
## Summary of the Pull Request Enables the `toggleFullscreen` action to be able to enter fullscreen mode, bound by default to <kbd>alt+enter</kbd>. The action is bubbled up to the WindowsTerminal (Win32) layer, where the window resizes itself to take the entire size of the monitor. This largely reuses code from conhost. Conhost already had a fullscreen mode, so I figured I might as well re-use that. ## References Unfortunately there are still very thin borders around the window when the NonClientIslandWindow is fullscreened. I think I know where the problem is. However, that area of code is about to get a massive overhaul with #3064, so I didn't want to necessarily make it worse right now. A follow up should be filed to add support for "Always show / reveal / never show tabs in fullscreen mode". Currently, the only mode is "never show tabs". Additionally, some of this code (particularily re:drawing the nonclient area) could be re-used for #2238. ## PR Checklist * [x] Closes #531, #3411 * [x] I work here * [n/a] Tests added/passed 😭 * [x] Requires documentation to be updated ## Validation Steps Performed * Manually tested both the NonClientIslandWindow and the IslandWindow. * Cherry-pick commit 8e56bfe * Don't draw the tab strip when maximized (cherry picked from commit bac4be7) * Fix the vista window flash for the NCIW (cherry picked from commit 7d3a18a) * Some code cleanup for review (cherry picked from commit 9e22b77) * A tad bit more notes and cleanup * Update schema, docs * Most of the PR comments * I'm not sure this actually works, so I'm committing it to revert it and check * Update some comments that were lost. * Fix a build break? * oh no
🎉This issue was addressed in #3394, which has now been successfully released as Handy links: |
You're going to hate to hear this, but it's actually "by design" -- there's no official way for an application to opt in to match the shell's "dark theme" |
You're going to hate to hear this (with all your effort 🙏), but could we roll it back to affect only the bottom border? 🤔 |
I don't want to come across as pushy, but I think the best idea is to fall back to the bottom border, and use the layered window attribute I commented earlier. It hides it perfectly, also while resizing. |
I appreciate your input. On the balance, though: the border pull request fixed at least seven different issues (#3064, #1307, #3136, #1897, #3222, #1859, #2268; this list does not count all the ones we later realized were caused by the same thing). I know that it's possible to get this right (Firefox manages it, for example), but I'd rather move forward and look for the right solution than move backward and settle on the pretty bad solution we had. |
Continuing discussion at #3425. We've figured out how to suppress the borders without using a private API. 😁 |
Environment
Steps to reproduce
Open Terminal app.
Expected behavior
Should not show a white border on the bottom of the window.
Actual behavior
Shows a 1 pixel thin white border on the bottom of the window.
The text was updated successfully, but these errors were encountered: