[PR #5213] [MERGED] Restore from minimized properly when "auto-hide taskbar" is enabled #26179

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5213
Author: @zadjii-msft
Created: 4/1/2020
Status: Merged
Merged: 4/1/2020
Merged by: @undefined

Base: masterHead: dev/migrie/b/5209-big-from-smol


📝 Commits (2)

  • cef0c7f Use MONITOR_DEFAULTTONEAREST so we can restore properly from minimized
  • 09e26f5 Merge remote-tracking branch 'origin/master' into dev/migrie/b/5209-big-from-smol

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp (+3 -1)

📄 Description

Summary of the Pull Request

When we're restoring from minimized, that MonitorFromWindow call is returning null. Curious that we're getting null here, when MSDN states:

If the window is currently minimized, MonitorFromWindow uses the rectangle of the window before it was minimized.

Turns out, MONITOR_DEFAULTTONEAREST just fixes this.

References

  • #4857 - original PR that added this code block

PR Checklist

Validation Steps Performed

Verified manually


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/5213 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 4/1/2020 **Status:** ✅ Merged **Merged:** 4/1/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/migrie/b/5209-big-from-smol` --- ### 📝 Commits (2) - [`cef0c7f`](https://github.com/microsoft/terminal/commit/cef0c7f4a357d48e6a86a6c9abd4686f58feff35) Use MONITOR_DEFAULTTONEAREST so we can restore properly from minimized - [`09e26f5`](https://github.com/microsoft/terminal/commit/09e26f5b4b33a6544eec215044c9116f2d9f7842) Merge remote-tracking branch 'origin/master' into dev/migrie/b/5209-big-from-smol ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp` (+3 -1) </details> ### 📄 Description ## Summary of the Pull Request When we're restoring from minimized, that `MonitorFromWindow` call is returning null. Curious that we're getting null here, when [MSDN states](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-monitorfromwindow): > If the window is currently minimized, MonitorFromWindow uses the rectangle of the window before it was minimized. Turns out, `MONITOR_DEFAULTTONEAREST` just fixes this. ## References * #4857 - original PR that added this code block ## PR Checklist * [x] Closes #5209 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed Verified manually --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:14:27 +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#26179