-
Notifications
You must be signed in to change notification settings - Fork 8.9k
WIP: Persist quake window size #19580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… quake window size on user event;
…rsor monitor & use the persisted size on initial activation;
This comment has been minimized.
This comment has been minimized.
| til::point origin{ (proposedRect.left + nonClientFrame.left), | ||
| (proposedRect.top) }; | ||
|
|
||
| if (_windowLogic.IsQuakeWindow()) |
There was a problem hiding this comment.
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).
|
@microsoft-github-policy-service agree |
| // Persist the new quake window size to ApplicationState | ||
| ApplicationState::SharedInstance().QuakeWindowSizePercent(static_cast<double>(sizePercent)); | ||
|
|
||
| #ifdef _DEBUG |
There was a problem hiding this comment.
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.
|
@zadjii-msft I'm not sure if unit tests, documentation and/or the schema should be updated. Some guidance here would be appreciated. |
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
WM_EXITSIZEMOVEcase toIslandWindowto check, calculate & store new quake window sizeApplicationStateproperty ofquakeWindowSizePercentto store & track resized values (defaults to 50%)AppHostto retrieve & store the saved sizeif (_windowLogic.IsQuakeWindow())block, the logic was updated to resolve an issue (see comments below)Validation Steps Performed
Manual Testing (document in PR):
Win+<backtick>)PR Checklist