[PR #15657] System menu for terminal shows up on wrong monitor #30693

Open
opened 2026-01-31 09:42:23 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/15657

State: closed
Merged: No


Summary of the Pull Request

This Pull Request addresses issue #15421. The system menu opened on the incorrect monitor in a multi-monitor setup when the terminal was maximized.

References and Relevant Issues

Issue: #15421

Detailed Description of the Pull Request / Additional comments

The problem was due to the positioning calculations for the system menu not considering that maximized windows have borders that extend beyond the monitor. This also affected the terminal in the borderless fullscreen (F11) mode.

In this PR, I've updated the positioning calculations to correctly account for the extended borders of maximized windows, ensuring that the system menu appears in the correct location on all monitors and in all display states, including the borderless fullscreen mode.

Additionally, this PR introduces extensive error checking and logging, which will assist in identifying and addressing similar issues in the future.

https://devblogs.microsoft.com/oldnewthing/20150304-00/?p=44543

Validation Steps Performed

I've validated this fix manually under various scenarios, including different monitor configurations, placements, and display states. The system menu now consistently opens correctly in all tested cases.

TAEF tests runner, no change.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/15657 **State:** closed **Merged:** No --- ## Summary of the Pull Request This Pull Request addresses issue #15421. The system menu opened on the incorrect monitor in a multi-monitor setup when the terminal was maximized. ## References and Relevant Issues Issue: #15421 ## Detailed Description of the Pull Request / Additional comments The problem was due to the positioning calculations for the system menu not considering that maximized windows have borders that extend beyond the monitor. This also affected the terminal in the borderless fullscreen (F11) mode. In this PR, I've updated the positioning calculations to correctly account for the extended borders of maximized windows, ensuring that the system menu appears in the correct location on all monitors and in all display states, including the borderless fullscreen mode. Additionally, this PR introduces extensive error checking and logging, which will assist in identifying and addressing similar issues in the future. https://devblogs.microsoft.com/oldnewthing/20150304-00/?p=44543 ## Validation Steps Performed I've validated this fix manually under various scenarios, including different monitor configurations, placements, and display states. The system menu now consistently opens correctly in all tested cases. TAEF tests runner, no change. ## PR Checklist - [x] Closes #15421
claunia added the pull-request label 2026-01-31 09:42:23 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30693