You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Left side of text is cut off when maximizing windows terminal on non-primary monitor #1055
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.
Reacted by Felix Freiberger, YihaoPeng, jmarkert, Kieren Johnstone, James Summerton, Malte Schledjewski, Dirk-Jan Wassink, Ben Lewis, Carlos Garcia-Vaso, Brandon Fowler and 4 more
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.
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.
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.
Gordon Mckeown (@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.
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.
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.
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 Brandon (@dsafa)
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).
Activity
Archomeda commentedon Jun 14, 2019
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 commentedon Jun 18, 2019
I can reproduce this only with the
showTabsInTitlebarsetting enabled. It looks like about 10px from the top and left are being cut off.mani2jeff commentedon Jun 22, 2019
I can reproduce on Surface Pro with 19" external monitor (with or without showTabsInTitlebar setting enabled) with all terminal types,

YihaoPeng commentedon Jun 24, 2019
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.

Terminal on primary monitor, everything is good.

gmckeown commentedon Jun 24, 2019
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 commentedon Jun 25, 2019
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.
7 remaining items
miniksa commentedon Jul 2, 2019
Gordon Mckeown (@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 commentedon Jul 2, 2019
OK, it does repro on the 4K monitor I found around here. I'll debug it.
dsafa commentedon Jul 3, 2019
I believe it has to do with this block where the
_maximizedMarginsis calculated. This checkdoes not work for non primary monitors that are positioned with an offset where
leftandtopwon't be 0.What I mean by not monitors aligned.

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.topbecomes 0 and it maximizes properly on the second monitor.gmckeown commentedon Jul 3, 2019
Brandon (@dsafa) I think that fits with my issue. Normally I use:
With this, I get the alignment issue. If I change to:
The problem isn't seen.
rw3iss commentedon 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 Brandon (@dsafa)
DaviMedrade commentedon Jul 4, 2019
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).
dsafa commentedon Jul 8, 2019
If its not picked up, I can try and get a PR done later.
Fix wrong maximized window offset on non primary monitors