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

Left side of text is cut off when maximizing windows terminal on non-primary monitor #1055

Closed
adiviness opened this issue May 29, 2019 · 20 comments · Fixed by #1921
Closed
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. 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

@adiviness
Copy link
Contributor

Environment

Windows build number: [run "ver" at a command prompt]
Windows Terminal version (if applicable):

Any other software?

Microsoft Windows [Version 10.0.18892.1001]

Steps to reproduce

Press the maximize button when the terminal is on a non-primary monitor

Expected behavior

All text should be visible

Actual behavior

A portion of the leftmost column of cells is cut off.

The text is fine when maximized on the primary monitor.

@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 May 29, 2019
@adiviness adiviness added the Product-Terminal The new Windows Terminal. label May 29, 2019
@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. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 30, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 30, 2019
@DHowett-MSFT DHowett-MSFT added the Help Wanted We encourage anyone to jump in on these. label Jun 13, 2019
@Archomeda
Copy link

I hope I can provide more information.

For me, this happens when using it on the second display on a dual monitor setup of primary 2560×1440 and secondary 1920x1080. When using two equal displays with 1920x1080, it doesn't happen at all.

Also, it seems that when using it in the first setup, the + button on the titlebar is cut off at the top (possibly the entire titlebar). But in the second setup, it's totally fine.

@dkter
Copy link
Contributor

dkter commented Jun 18, 2019

I can reproduce this only with the showTabsInTitlebar setting enabled. It looks like about 10px from the top and left are being cut off.

@mani2jeff
Copy link

I can reproduce on Surface Pro with 19" external monitor (with or without showTabsInTitlebar setting enabled) with all terminal types,
TerminalExternalLeft

@YihaoPeng
Copy link

1920x1080 primary display and 3840x2160 non-primary monitor, each has a high DPI scaling factor of 150%.

Terminal on non-primary monitor, left and top is cut off.
屏幕截图(15)

Terminal on primary monitor, everything is good.
屏幕截图(16)

@gmckeown
Copy link

Seeing this issue on Dell Precision 5520 with Intel and Nvidia GPUs. Internal screen 1920x1080, external screen one 1920x1080, external screen two 3840x2160. Internal screen is set as primary.

Only see this issue on the 3840x2160 (4K) display. Scaling factor doesn't seem to affect it (tried 100%, 150%, 175%).

Orientation of the screens doesn't obviously make a difference. Normally I have Left (scr two) - Middle (Internal) - Right (scr one). Switched the external screens around so that Windows thinks screen two is on the right, and the issue stays with screen two (the 4K one).

Occurs with PowerShell, PowerShell Core, Windows Cmd, and Ubuntu sessions, including those started after the window is maximised.

@mani2jeff
Copy link

After my initial post on Friday, when I first noticed the problem, I tried again on Sunday (yesterday) and it was working fine. I don't know why it changed, and I don't think there was an update. However, I am glad it is now working. The external monitor is an older 1280x1024 while the main Surface Pro display is 2736x1824. I give those details for context.

@gmckeown
Copy link

Still seeing the issue here.

@benjisoft
Copy link

benjisoft commented Jun 26, 2019

I am also suffering with this issue. All of my monitors are the same resolution and scale. (The only difference is the colour profile of the monitor.

@troybailey36
Copy link

troybailey36 commented Jun 26, 2019

I am also seeing the bottom of the terminal cut off by taskbar as well as the left side on my non-primary monitor
image

@miniksa
Copy link
Member

miniksa commented Jun 28, 2019

Just FYI, I tried this locally.

It is working fine on my non-primary monitors.
When I change the DPI/scaling of my monitors, it's still OK.

I still will have to go get the 4K monitor and test that way.
And then I'll try with a Surface device and an external monitor after that.

@gmckeown
Copy link

@miniksa Is there any information we can provide to help track down the cause?

@DaviMedrade
Copy link

Windows 10.0.18362.207
Terminal 0.2.1715.0 from the Store

My setup is a 1920×1080 main screen and a 1600×900 screen to the left, both at 100% scaling. In the main screen there is no problem, but the problem described in this issue happens in the secondary monitor, at the top, left, and bottom of the window.

@miniksa
Copy link
Member

miniksa commented Jul 2, 2019

@gmckeown, that's a catch-22. If I knew what could help, I'd probably know what was going wrong. Right now, it's just a mystery to me so I need to see it happening and get a debugger on it, or find someone with this issue externally who has the confidence to debug it themselves and tell us what's going wrong.

@miniksa
Copy link
Member

miniksa commented Jul 2, 2019

OK, it does repro on the 4K monitor I found around here. I'll debug it.

@dsafa
Copy link
Contributor

dsafa commented Jul 3, 2019

I believe it has to do with this block where the _maximizedMargins is calculated. This check

if (rcMaximum.left == 0)
{
    offset = windowPos->x;
}
else if (rcMaximum.top == 0)
{
    offset = windowPos->y;
}

does not work for non primary monitors that are positioned with an offset where left and top won't be 0.

What I mean by not monitors aligned.
ApplicationFrameHost_nnfjcbW3g4
I can reproduce the issue with an arrangement like in the above example. If I change it so that they are arranged side-by-side, then rcMaximum.top becomes 0 and it maximizes properly on the second monitor.

@gmckeown
Copy link

gmckeown commented Jul 3, 2019

@dsafa I think that fits with my issue. Normally I use:

image

With this, I get the alignment issue. If I change to:

image

The problem isn't seen.

@rw3iss
Copy link

rw3iss commented Jul 4, 2019

Can confirm this also happens if the monitor alignment in display settings is not aligned to the top or bottom of the main monitor exactly. Thanks for the fix @dsafa

@DaviMedrade
Copy link

Confirmed. This is my setup, and the issue happens when the window is in monitor 2. If I align the screen to the top of the other, then the issue disappears once I restore and maximize the window again. Notice that this happens to me even when the bottom of the secondary screen is aligned with the bottom of the main screen (it only disappears when the tops of both screens are aligned).

image

@dsafa
Copy link
Contributor

dsafa commented Jul 8, 2019

If its not picked up, I can try and get a PR done later.

dsafa added a commit to dsafa/terminal that referenced this issue Jul 11, 2019
@ghost ghost added the In-PR This issue has a related PR label Jul 11, 2019
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements 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 Jul 11, 2019
@miniksa miniksa removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 12, 2019
@ghost
Copy link

ghost commented Aug 3, 2019

🎉This issue was addressed in #1921, which has now been successfully released as Windows Terminal Preview v0.3.2142.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 Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. 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.