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

"initialPosition" doesn't respect window frame size #10583

Closed
SirHesti opened this issue Jul 8, 2021 · 6 comments · Fixed by #10902
Closed

"initialPosition" doesn't respect window frame size #10583

SirHesti opened this issue Jul 8, 2021 · 6 comments · Fixed by #10902
Assignees
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@SirHesti
Copy link

SirHesti commented Jul 8, 2021

Windows Terminal version (or Windows build number)

Version: 1.9.1523.0

Other Software

No response

Steps to reproduce

start wt with "initialPosition": "-1920,0", in the json.

Expected Behavior

start wt with position on the left Screen of 4

Actual Behavior

The Window appears ~8 Pixel left from the left side of the Screen

I have 4 Screens attached to my PC

1 2 3 4

3 is the main screen; the wt should appear on screen 2 Top Left.
If you reduce the value from -1920 to -1927, wt will be positioned on screen 1. the position -1927.0 is actually actually there. I have the feeling that the frame of the Windows is included in the calculation, but it is not there: ((

@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 Jul 8, 2021
@zadjii-msft
Copy link
Member

Okay that's a fair complaint. Kinda shocked that no one else has noticed this yet. Thanks!

@zadjii-msft zadjii-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. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Jul 8, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 8, 2021
@zadjii-msft zadjii-msft added the Help Wanted We encourage anyone to jump in on these. label Jul 8, 2021
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Jul 8, 2021
@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jul 8, 2021
@DHowett DHowett changed the title "initialPosition": don't works currect "initialPosition" doesn't respect window frame size Jul 8, 2021
@ondrix
Copy link

ondrix commented Aug 3, 2021

I'm not sure this is the same issue but with initialPosition = "0,0" the terminal window opens like this
image

@DHowett
Copy link
Member

DHowett commented Aug 3, 2021

That is indeed the same problem!

@zadjii-msft zadjii-msft self-assigned this Aug 3, 2021
@zadjii-msft
Copy link
Member

This is dangerously close to #10199 so I'm just gonna pull this into 1.11 while I've been looking at these

zadjii-msft added a commit that referenced this issue Aug 5, 2021
@ghost ghost added the In-PR This issue has a related PR label Aug 9, 2021
@ghost ghost closed this as completed in #10902 Aug 9, 2021
ghost pushed a commit that referenced this issue Aug 9, 2021
## Summary of the Pull Request

Turns out, we'd only ever use the non-client size to calculate the size of the window, but not the actual position. As we learned in #10676, the nonclient area extends a few pixels past the visible borders of the window. 

## PR Checklist
* [x] Closes #10583
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Validation Steps Performed
* [x] Works with the `IslandWindow`
* [x] Works with the `NonClientIslandWindow`
@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 Aug 9, 2021
DHowett pushed a commit that referenced this issue Aug 25, 2021
## Summary of the Pull Request

Turns out, we'd only ever use the non-client size to calculate the size of the window, but not the actual position. As we learned in #10676, the nonclient area extends a few pixels past the visible borders of the window. 

## PR Checklist
* [x] Closes #10583
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Validation Steps Performed
* [x] Works with the `IslandWindow`
* [x] Works with the `NonClientIslandWindow`
@ghost
Copy link

ghost commented Aug 31, 2021

🎉This issue was addressed in #10902, which has now been successfully released as Windows Terminal Preview v1.10.2383.0.:tada:

Handy links:

@ghost
Copy link

ghost commented Aug 31, 2021

🎉This issue was addressed in #10902, which has now been successfully released as Windows Terminal Preview v1.11.2421.0.:tada:

Handy links:

This issue was closed.
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 Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) 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.

4 participants