Weird Placement when first opening terminal on windows 11 #20536

Closed
opened 2026-01-31 07:16:52 +00:00 by claunia · 4 comments
Owner

Originally created by @l-urk on GitHub (Sep 23, 2023).

Windows Terminal version

No response

Windows build number

No response

Other Software

No response

Steps to reproduce

Opening Windows Terminal for the first time on windows 11 on a 1920x1080 screen...

Expected Behavior

Top left placement similar to CMD.exe.

Actual Behavior

Bad placement.

Originally created by @l-urk on GitHub (Sep 23, 2023). ### Windows Terminal version _No response_ ### Windows build number _No response_ ### Other Software _No response_ ### Steps to reproduce Opening Windows Terminal for the first time on windows 11 on a 1920x1080 screen... ### Expected Behavior Top left placement similar to CMD.exe. ### Actual Behavior Bad placement.
Author
Owner

@DHowett commented on GitHub (Sep 23, 2023):

Thanks for filing!
Can you share the way in which the window placed poorly? For me, it launches in roughly the same place as CMD does.

image

In addition -- sorry, I may have missed it in the template above -- what version of Terminal are you using?

@DHowett commented on GitHub (Sep 23, 2023): Thanks for filing! Can you share the way in which the window placed poorly? For me, it launches in roughly the same place as CMD does. <img width="444" alt="image" src="https://github.com/microsoft/terminal/assets/189190/57202004-e8ed-44e5-a351-541a78ed457e"> In addition -- sorry, I may have missed it in the template above -- what version of Terminal are you using?
Author
Owner

@l-urk commented on GitHub (Sep 23, 2023):

It's seemingly near random. Version: 1.17.11461.0
Screenshot 2023-09-22 174433

@l-urk commented on GitHub (Sep 23, 2023): It's seemingly near random. Version: 1.17.11461.0 <img width="572" alt="Screenshot 2023-09-22 174433" src="https://github.com/microsoft/terminal/assets/112792604/eca69ad1-eed3-42e3-bf54-a990bd8661c6">
Author
Owner

@zadjii-msft commented on GitHub (Sep 24, 2023):

That looks like Windows default behavior when opening Win32 apps. They open as a little "cascade" along that diagonal (depending if there's already another app opened at that position).

From https://learn.microsoft.com/en-us/windows/win32/winmsg/window-features#default-size-and-position:

An application can allow the system to calculate the initial size or position of a top-level window by specifying CW_USEDEFAULT in CreateWindowEx. If the application sets the window's coordinates to CW_USEDEFAULT and has created no other top-level windows, the system sets the new window's position relative to the upper left corner of the screen

You can of course set the initialPosition for the Terminal manually in the settings.

@zadjii-msft commented on GitHub (Sep 24, 2023): That looks like Windows default behavior when opening Win32 apps. They open as a little "cascade" along that diagonal (depending if there's already another app opened at that position). From https://learn.microsoft.com/en-us/windows/win32/winmsg/window-features#default-size-and-position: > An application can allow the system to calculate the initial size or position of a top-level window by specifying CW_USEDEFAULT in [CreateWindowEx](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-createwindowexa). If the application sets the window's coordinates to CW_USEDEFAULT and has created no other top-level windows, the system sets the new window's position relative to the upper left corner of the screen You can of course set the [`initialPosition`](https://learn.microsoft.com/en-us/windows/terminal/customize-settings/startup#launch-position) for the Terminal manually in the settings.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Oct 1, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (Oct 1, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20536