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

Window Border expands when showTabsInTitlebar is enabled #3136

Closed
RRitts opened this issue Oct 9, 2019 · 6 comments · Fixed by #3394
Closed

Window Border expands when showTabsInTitlebar is enabled #3136

RRitts opened this issue Oct 9, 2019 · 6 comments · Fixed by #3394
Assignees
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.
Milestone

Comments

@RRitts
Copy link

RRitts commented Oct 9, 2019

I originally opened #2333 which was supposed to be resolved by #2150 but I am still seeing the issue in 0.5

Environment

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


Steps to reproduce

Set showTabsInTitlebar to true.

Expected behavior

working

Actual behavior

true

When showTabsInTitlebar is false

false

@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 9, 2019
@DHowett-MSFT
Copy link
Contributor

Thanks for reopening! Now that the DPI thing is fixed, I've got a hunch.

When you drag/drop things (anywhere!), does it seem like it takes longer to trigger or is less sensitive?

@RRitts
Copy link
Author

RRitts commented Oct 9, 2019

As a matter of fact, yes.

We put a GPO in place years ago to cut down on things "missing" from our file server when a user would inadvertently drag and drop folders. It modifies the DragHeight and DragWidth values in HKLM\Control Panel\Desktop

@DHowett-MSFT
Copy link
Contributor

DHowett-MSFT commented Oct 9, 2019

YES! You are now an excellent case study on why nobody should use the SM_CXDRAG system metric to measure window borders.

@RRitts
Copy link
Author

RRitts commented Oct 10, 2019

Behold!

BAM

This is this DragHeight and DragWidth set to 4. The GPO was setting them to 45.

@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. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Oct 10, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 10, 2019
@zadjii-msft
Copy link
Member

(We think that this is going to be closely related to a bucket of things, #3136 #1859 #3064 #1307)

@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.

3 participants