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

Closed
opened 2026-01-30 22:25:09 +00:00 by claunia · 20 comments
Owner

Originally created by @adiviness on GitHub (May 29, 2019).

Originally assigned to: @miniksa on GitHub.

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.

Originally created by @adiviness on GitHub (May 29, 2019). Originally assigned to: @miniksa on GitHub. <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none 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.
Author
Owner

@Archomeda commented on GitHub (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.

@Archomeda commented on GitHub (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.
Author
Owner

@dkter commented on GitHub (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.

@dkter commented on GitHub (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.
Author
Owner

@mani2jeff commented on GitHub (Jun 22, 2019):

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

@mani2jeff commented on GitHub (Jun 22, 2019): I can reproduce on Surface Pro with 19" external monitor (with or without showTabsInTitlebar setting enabled) with all terminal types, ![TerminalExternalLeft](https://user-images.githubusercontent.com/34294809/59958909-34d07900-946b-11e9-9566-f83e79a8bb8c.jpg)
Author
Owner

@YihaoPeng commented on GitHub (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.
屏幕截图(15)

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

@YihaoPeng commented on GitHub (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. ![屏幕截图(15)](https://user-images.githubusercontent.com/26923506/59998172-59a63580-9691-11e9-8b89-31777876d136.png) Terminal on primary monitor, everything is good. ![屏幕截图(16)](https://user-images.githubusercontent.com/26923506/59998200-6aef4200-9691-11e9-9f94-c57a4153bbd9.png)
Author
Owner

@gmckeown commented on GitHub (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.

@gmckeown commented on GitHub (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.
Author
Owner

@mani2jeff commented on GitHub (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.

@mani2jeff commented on GitHub (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.
Author
Owner

@gmckeown commented on GitHub (Jun 25, 2019):

Still seeing the issue here.

@gmckeown commented on GitHub (Jun 25, 2019): Still seeing the issue here.
Author
Owner

@benji-lewis commented on GitHub (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.

@benji-lewis commented on GitHub (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.
Author
Owner

@troybailey36 commented on GitHub (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

@troybailey36 commented on GitHub (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](https://user-images.githubusercontent.com/20546806/60196848-17553380-980c-11e9-9314-1ee881a2ba2e.png)
Author
Owner

@miniksa commented on GitHub (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.

@miniksa commented on GitHub (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.
Author
Owner

@gmckeown commented on GitHub (Jun 28, 2019):

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

@gmckeown commented on GitHub (Jun 28, 2019): @miniksa Is there any information we can provide to help track down the cause?
Author
Owner

@DaviMedrade commented on GitHub (Jul 2, 2019):

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.

@DaviMedrade commented on GitHub (Jul 2, 2019): 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.
Author
Owner

@miniksa commented on GitHub (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 commented on GitHub (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.
Author
Owner

@miniksa commented on GitHub (Jul 2, 2019):

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

@miniksa commented on GitHub (Jul 2, 2019): OK, it does repro on the 4K monitor I found around here. I'll debug it.
Author
Owner

@dsafa commented on GitHub (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.

@dsafa commented on GitHub (Jul 3, 2019): I believe it has to do with this [block](https://github.com/microsoft/terminal/blob/d8485079cd8d676cea7dd4400a5233d31ea49829/src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp#L610) where the `_maximizedMargins` is calculated. This check ```cpp 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](https://user-images.githubusercontent.com/7334282/60566209-13994380-9d1b-11e9-9947-4aa927c0eb22.png) 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.
Author
Owner

@gmckeown commented on GitHub (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.

@gmckeown commented on GitHub (Jul 3, 2019): @dsafa I think that fits with my issue. Normally I use: ![image](https://user-images.githubusercontent.com/22765233/60583679-5858c500-9d83-11e9-81c3-65c6dcece9d0.png) With this, I get the alignment issue. If I change to: ![image](https://user-images.githubusercontent.com/22765233/60583789-90f89e80-9d83-11e9-985f-c7d63efbb382.png) The problem isn't seen.
Author
Owner

@rw3iss commented on GitHub (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

@rw3iss commented on GitHub (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
Author
Owner

@DaviMedrade commented on GitHub (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).

image

@DaviMedrade commented on GitHub (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). ![image](https://user-images.githubusercontent.com/39162/60683891-d0e97f80-9e70-11e9-9983-4cfe7848531b.png)
Author
Owner

@dsafa commented on GitHub (Jul 8, 2019):

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

@dsafa commented on GitHub (Jul 8, 2019): If its not picked up, I can try and get a PR done later.
Author
Owner

@ghost commented on GitHub (Aug 3, 2019):

:tada:This issue was addressed in #1921, which has now been successfully released as Windows Terminal Preview v0.3.2142.0.🎉

Handy links:

@ghost commented on GitHub (Aug 3, 2019): :tada:This issue was addressed in #1921, which has now been successfully released as `Windows Terminal Preview v0.3.2142.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.3.2142.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1403