Skip to content

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

Closed

Description

@adiviness

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.

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on May 29, 2019
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on May 29, 2019
  3. added
    Area-UserInterfaceIssues pertaining to the user interface of the Console or Terminal
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    and removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on May 30, 2019
  4. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on May 30, 2019
  5. Archomeda commented on Jun 14, 2019

    @Archomeda

    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.

  6. dkter commented on Jun 18, 2019

    @dkter
    Contributor

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

  7. mani2jeff commented on Jun 22, 2019

    @mani2jeff

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

  8. YihaoPeng commented on Jun 24, 2019

    @YihaoPeng

    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)

  9. gmckeown commented on Jun 24, 2019

    @gmckeown

    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.

  10. mani2jeff commented on Jun 25, 2019

    @mani2jeff

    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.

  11. 7 remaining items

  12. miniksa commented on Jul 2, 2019

    @miniksa
    Contributor

    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.

  13. miniksa commented on Jul 2, 2019

    @miniksa
    Contributor

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

  14. dsafa commented on Jul 3, 2019

    @dsafa
    Contributor

    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.

  15. gmckeown commented on Jul 3, 2019

    @gmckeown

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

  16. rw3iss commented on Jul 4, 2019

    @rw3iss

    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)

  17. DaviMedrade commented on Jul 4, 2019

    @DaviMedrade

    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

  18. dsafa commented on Jul 8, 2019

    @dsafa
    Contributor

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

  19. added a commit that references this issue on Jul 11, 2019
    345a8ee
  20. ghost added
    In-PRThis issue has a related PR
    on Jul 11, 2019
  21. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jul 11, 2019
  22. ghost removed
    In-PRThis issue has a related PR
    on Jul 11, 2019
  23. ghost added
    Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
    on Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalHelp WantedWe encourage anyone to jump in on these.Issue-BugIt either shouldn't be doing this or needs an investigation.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions