[PR #10744] Recalculate quake window size when snapping across monitors #28211

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

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

State: closed
Merged: Yes


Summary of the Pull Request

win+shift+arrows can be used to move windows to adjacent monitors. When that happens, we'll new re-calculate the size of the window for the new monitor.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

In WM_WINDOWPOSCHANGING, the OS says "hey, I'm about to do {something} to your window. You cool with that?". We handle that message by:

  1. checking if the window was moved as a part of this message
  2. getting the monitor that the window will be moved onto
  3. If that monitor is different than the monitor the window is currently on, then
  • calculate how big the quake window should be on that monitor
  • tell the OS that's where we'd like to be.

Validation Steps Performed

  • win+shift+arrows works right now
  • normal quake summoning still works right
**Original Pull Request:** https://github.com/microsoft/terminal/pull/10744 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request <kbd>win+shift+arrows</kbd> can be used to move windows to adjacent monitors. When that happens, we'll new re-calculate the size of the window for the new monitor. ## References * megathread: #8888 ## PR Checklist * [x] Closes #10274 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments In `WM_WINDOWPOSCHANGING`, the OS says "hey, I'm about to do {something} to your window. You cool with that?". We handle that message by: 1. checking if the window was _moved_ as a part of this message 2. getting the monitor that the window will be moved onto 3. If that monitor is different than the monitor the window is currently on, then * calculate how big the quake window should be on that monitor * tell the OS that's where we'd like to be. ## Validation Steps Performed * <kbd>win+shift+arrows</kbd> works right now * normal quake summoning still works right
claunia added the pull-request label 2026-01-31 09:27:02 +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#28211