Repository navigation
Conversation
The resize keeps the source display bounds and, when the screen will change and the target width or height exceeds those bounds by more than 2 points, moves the window to the target origin before sizing. It then applies the full frame with sizeFirst false, waiting 16 milliseconds before each attempt, and stops when the read-back is within the 10-point approximatelyEqual tolerance or after 20 applies. Resizes that stay on one screen, have no source display, or fit inside the source bounds still size first, and retry once if the read-back does not match. shouldMoveBeforeSizing and shouldReapplyFrame hold those decisions, and CrossDisplayResizeTests exercises them with the reported 1470 by 956 source, the 1068 by 1878 target, and the clamped 1068 by 1450 read-back. Fixes mrkai77#1148
|
Hey, thanks for looking into this! Unfortunately, this isn't something we can merge as-is. Our AI usage policy asks that AI-assisted PRs are tested in the environments they target, and that you don't submit code for configurations you can't personally run. This bug only happens when moving a window between two displays, and the testing section here is still the template's placeholders, with a note that the tests weren't run. That's something we'd need to see verified before reviewing it in depth. I also don't think this fixes the underlying problem. It retries For future PRs, please make sure to fill out the PR template completely, including the checklist and how it's been tested! |
Description
The resize keeps the source display bounds and, when the screen will change and the target width or height exceeds those bounds by more than 2 points, moves the window to the target origin before sizing. It then applies the full frame with sizeFirst false, waiting 16 milliseconds before each attempt, and stops when the read-back is within the 10-point approximatelyEqual tolerance or after 20 applies. Resizes that stay on one screen, have no source display, or fit inside the source bounds still size first, and retry once if the read-back does not match. shouldMoveBeforeSizing and shouldReapplyFrame hold those decisions, and CrossDisplayResizeTests exercises them with the reported 1470 by 956 source, the 1068 by 1878 target, and the clamped 1068 by 1450 read-back.
With Use screen with cursor enabled, the first Maximize that also moves a window onto another display can leave it only partly maximized. The window takes the requested x and width on the destination, but the vertical edges stay short of the target frame, so a second Maximize is required to fill that display. On a non-animated cross-display resize, setFrame is called with sizeFirst, so the window is sized while it still belongs to the source display. WindowServer clamps a target larger than that display, and the second size inside setFrame runs before display membership updates, leaving the clamped frame in place. A maximize onto a taller display exceeds the source height and hits that clamp.
Fixes #1148
How has this been tested?
The test command did not run a suite for the touched files.
Checklist:
Please describe to which degree, if any, an LLM was used in creating this pull request.
Nothing to add for this change.
AI disclosure
AI was used for assistance.