Quake mode doesn't scale width when changing monitor size #15065

Open
opened 2026-01-31 04:27:25 +00:00 by claunia · 11 comments
Owner

Originally created by @benjamincburns on GitHub (Sep 3, 2021).

Windows Terminal version (or Windows build number)

1.11.2421.0

Other Software

Windows 10 20H2 build 19042.1165

Steps to reproduce

  1. Start Windows Terminal while using wider monitor on laptop dock and open quake window
  2. Unplug laptop from dock
  3. Show the quake window (may not be necessary)
  4. Hide the quake window (may not be necessary)
  5. Plug back into dock
  6. Show the quake window

Expected Behavior

When I plug back into my external monitor I'd expect the width of the quake window to fit the width of the monitor, or at the very least, to be able to resize the quake window horizontally to make this be the case.

Actual Behavior

The quake window stays sized to the narrower monitor, even after switching back to a wider monitor (see screenshot below).

image

Originally created by @benjamincburns on GitHub (Sep 3, 2021). ### Windows Terminal version (or Windows build number) 1.11.2421.0 ### Other Software Windows 10 20H2 build 19042.1165 ### Steps to reproduce 1. Start Windows Terminal while using wider monitor on laptop dock and open quake window 2. Unplug laptop from dock 2. Show the quake window (may not be necessary) 3. Hide the quake window (may not be necessary) 4. Plug back into dock 5. Show the quake window ### Expected Behavior When I plug back into my external monitor I'd expect the width of the quake window to fit the width of the monitor, or at the very least, to be able to resize the quake window horizontally to make this be the case. ### Actual Behavior The quake window stays sized to the narrower monitor, even after switching back to a wider monitor (see screenshot below). ![image](https://user-images.githubusercontent.com/803016/131936946-f1c2e3bf-014b-4f12-9f71-f9139d63d684.png)
claunia added the Help WantedIssue-BugPriority-3Product-TerminalArea-Windowing labels 2026-01-31 04:27:25 +00:00
Author
Owner

@benjamincburns commented on GitHub (Sep 3, 2021):

Not sure if this is related to #10515, but it looks (very) loosely similar, so mentioning it just in case.

@benjamincburns commented on GitHub (Sep 3, 2021): Not sure if this is related to #10515, but it looks (very) loosely similar, so mentioning it just in case.
Author
Owner

@DHowett commented on GitHub (Sep 3, 2021):

Ah, would you mind updating to the latest version?

@DHowett commented on GitHub (Sep 3, 2021): Ah, would you mind updating to the latest version?
Author
Owner

@benjamincburns commented on GitHub (Sep 3, 2021):

@DHowett this is still a problem on 1.11.2421.0 - I'll update the version info in my description.

@benjamincburns commented on GitHub (Sep 3, 2021): @DHowett this is still a problem on 1.11.2421.0 - I'll update the version info in my description.
Author
Owner

@DHowett commented on GitHub (Sep 3, 2021):

Thank you! 🙂

@DHowett commented on GitHub (Sep 3, 2021): Thank you! 🙂
Author
Owner

@b-hayes commented on GitHub (Sep 3, 2021):

Did this just get fixed in https://github.com/microsoft/terminal/pull/10744 ?

@b-hayes commented on GitHub (Sep 3, 2021): Did this just get fixed in https://github.com/microsoft/terminal/pull/10744 ?
Author
Owner

@zadjii-msft commented on GitHub (Sep 8, 2021):

This does look like #10744, but that one was fixed in v1.11.2421.0. Presumably we don't get a WM_WINDOWPOSCHANGING in this scenario, maybe we get some other message.

@zadjii-msft commented on GitHub (Sep 8, 2021): This does look like #10744, but that one was fixed in v1.11.2421.0. Presumably we don't get a `WM_WINDOWPOSCHANGING` in this scenario, maybe we get some other message.
Author
Owner

@b-hayes commented on GitHub (Sep 8, 2021):

Might also pay to check when UI scaling changes for the current screen. Bit of an edge case I probably change mine more often than most.

@b-hayes commented on GitHub (Sep 8, 2021): Might also pay to check when UI scaling changes for the current screen. Bit of an edge case I probably change mine more often than most.
Author
Owner

@CherryDT commented on GitHub (Nov 30, 2022):

I encounter this issue now too. My situation is as follows: When I connect my external screen, the internal screen becomes the secondary screen and has a lower resolution. Now I had the external screen connected and then disconnected again and now the window doesn't have the full width anymore.

@CherryDT commented on GitHub (Nov 30, 2022): I encounter this issue now too. My situation is as follows: When I connect my external screen, the internal screen becomes the secondary screen and has a lower resolution. Now I had the external screen connected and then disconnected again and now the window doesn't have the full width anymore.
Author
Owner

@Uxorious commented on GitHub (Oct 6, 2023):

This is still an issue btw.

@Uxorious commented on GitHub (Oct 6, 2023): This is still an issue btw.
Author
Owner

@zadjii-msft commented on GitHub (Oct 6, 2023):

I believe there's a 99% chance this will be fixed when we do the SPI_WORKAREA thing from #16067

@zadjii-msft commented on GitHub (Oct 6, 2023): I believe there's a 99% chance this will be fixed when we do the SPI_WORKAREA thing from #16067
Author
Owner

@CherryDT commented on GitHub (Oct 2, 2024):

Workaround: Run this AutoHotkey (v1) script whenever the size is messed up:

WinGet, windowID, ID, ahk_class CASCADIA_HOSTING_WINDOW_CLASS

if windowID
{
    WinGetPos, x, y, width, height, ahk_id %windowID%
    SysGet, monitor, Monitor, %x%, %y%
    SysGet, MonitorWorkArea, MonitorWorkArea, %monitor%
    screenWidth := MonitorWorkAreaRight - MonitorWorkAreaLeft
    screenHeight := MonitorWorkAreaBottom - MonitorWorkAreaTop

    tolerance := 10
    if (x >= MonitorWorkAreaLeft - tolerance and x <= MonitorWorkAreaLeft + tolerance and y >= MonitorWorkAreaTop - tolerance and y <= MonitorWorkAreaTop + tolerance)
    {
        offsetX := x - MonitorWorkAreaLeft
        offsetY := y - MonitorWorkAreaTop

        adjustedWidth := screenWidth - (2 * offsetX)
        adjustedHeight := (screenHeight / 2) - (2 * offsetY)

        WinMove, ahk_id %windowID%, , %x%, %y%, %adjustedWidth%, %adjustedHeight%
    }
}
@CherryDT commented on GitHub (Oct 2, 2024): Workaround: Run this AutoHotkey (v1) script whenever the size is messed up: ```ahk WinGet, windowID, ID, ahk_class CASCADIA_HOSTING_WINDOW_CLASS if windowID { WinGetPos, x, y, width, height, ahk_id %windowID% SysGet, monitor, Monitor, %x%, %y% SysGet, MonitorWorkArea, MonitorWorkArea, %monitor% screenWidth := MonitorWorkAreaRight - MonitorWorkAreaLeft screenHeight := MonitorWorkAreaBottom - MonitorWorkAreaTop tolerance := 10 if (x >= MonitorWorkAreaLeft - tolerance and x <= MonitorWorkAreaLeft + tolerance and y >= MonitorWorkAreaTop - tolerance and y <= MonitorWorkAreaTop + tolerance) { offsetX := x - MonitorWorkAreaLeft offsetY := y - MonitorWorkAreaTop adjustedWidth := screenWidth - (2 * offsetX) adjustedHeight := (screenHeight / 2) - (2 * offsetY) WinMove, ahk_id %windowID%, , %x%, %y%, %adjustedWidth%, %adjustedHeight% } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15065