From 0cd97a920cc3908e2b87bf9bdac655e3f01fdb22 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Tue, 20 Jul 2021 11:26:35 -0500 Subject: [PATCH] Re-evaluate the size of the quake window when it's summoned to a monitor (#10674) ## Summary of the Pull Request When the quake window is moved to another monitor, re-evaluate it's size for that monitor. ## References * megathread: #8888 * Similar, but not the same: #10274 ## PR Checklist * [x] Closes #10182 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments We'll probably need to do this in a few more places, but I'm breaking PRs into small chunks for easier reviews. ## Validation Steps Performed Summoned the window to a bunch of different resolutions. Where it would use the wrong size before, it no longer does. --- src/cascadia/WindowsTerminal/IslandWindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cascadia/WindowsTerminal/IslandWindow.cpp b/src/cascadia/WindowsTerminal/IslandWindow.cpp index 33b250c3da6..90433a8616e 100644 --- a/src/cascadia/WindowsTerminal/IslandWindow.cpp +++ b/src/cascadia/WindowsTerminal/IslandWindow.cpp @@ -1406,6 +1406,13 @@ void IslandWindow::_moveToMonitor(const MONITORINFO activeMonitor) currentWindowRect.width(), currentWindowRect.height(), SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); + + // GH#10274, GH#10182: Re-evaluate the size of the quake window when we + // move to another monitor. + if (IsQuakeWindow()) + { + _enterQuakeMode(); + } } }