microsoft / microsoft/terminal

Terminal opens on the wrong screen if the main screen changes over time

Open
#16,207 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Windowing Issue-Bug Priority-2 Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.18.2822.0

### Windows build number

10.0.22621.0

### Other Software

_No response_

### Steps to reproduce

I have 2 screens, A and B, with A configured as the main display in the Windows display settings.
If I boot with only B turned on, Terminal opens on B.
However, if I later turn on A, Terminal continues opening on B, even after I've turned it off.

I have this with my PC (A with DisplayPort, B with HDMI) and my laptop (A with HDMI, B the laptop screen).

Note that other applications, like Notepad, don't have this behavior, so I assume this must be a Terminal issue. This is with all Terminal's settings at default (except that I've changed `Default profile` and added additional profiles, but that's irrelevant).

### Expected Behavior

Terminal opens on the current main display as configured in the Windows display settings.

### Actual Behavior

Terminal opens on the secondary display, even if it is turned off.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by reproducing the two-display sequence on Windows and trace the existing terminal window-placement behavior. Done means Terminal opens on the currently configured main display after that display is turned on or changed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.