Skip to content

Conversation

@metal-gabe
Copy link

@metal-gabe metal-gabe commented Nov 24, 2025

Summary of the Pull Request

Adds state persistence logic for the quake window to remember its size.

Note

This PR addresses the first item in the linked checklist below. Separate PR's will be submitted for the other items.

References and Relevant Issues

Implementation Checklist

Detailed Description of the Pull Request / Additional comments

  • Added WM_EXITSIZEMOVE case to IslandWindow to check, calculate & store new quake window size
  • Added a global ApplicationState property of quakeWindowSizePercent to store & track resized values (defaults to 50%)
  • Updated AppHost to retrieve & store the saved size
    • In the if (_windowLogic.IsQuakeWindow()) block, the logic was updated to resolve an issue (see comments below)

Validation Steps Performed

Manual Testing (document in PR):

  • Open quake window (Win+<backtick>)
  • Resize the quake window vertically
  • Close and reopen the quake window (i.e. restart) → verify it remembers the size
  • Test on multi-monitor setup → verify size persists per monitor

PR Checklist

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Windowing Window frame, quake mode, tearout Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Nov 24, 2025
@github-actions

This comment has been minimized.

til::point origin{ (proposedRect.left + nonClientFrame.left),
(proposedRect.top) };

if (_windowLogic.IsQuakeWindow())
Copy link
Author

@metal-gabe metal-gabe Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic below was updated due to an issue where, after compiling/building, the very first activation would open on the main monitor (i.e. not on the current monitor that the cursor was on, which does not align with the behavior of the current release) at 50% (it wasn't using the stored size).

@metal-gabe
Copy link
Author

@microsoft-github-policy-service agree

// Persist the new quake window size to ApplicationState
ApplicationState::SharedInstance().QuakeWindowSizePercent(static_cast<double>(sizePercent));

#ifdef _DEBUG
Copy link
Author

@metal-gabe metal-gabe Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All debug logs that were added can be removed once this PR is ready for final review.

@metal-gabe
Copy link
Author

@zadjii-msft I'm not sure if unit tests, documentation and/or the schema should be updated. Some guidance here would be appreciated.

@github-actions

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quake Mode should remember its size

1 participant