Repository navigation
fix(macos): Flip AppWindow position to top-left - #25651
Merged
ramezgerges merged 2 commits intoOct 26, 2026
Merged
Conversation
AppWindow.Position and Move used AppKit's bottom-left frame origin, so a larger Y moved the window up. Position is now the top-left corner with Y growing down, flipped against the primary screen like ConvertLocalToScreen, and Resize keeps that corner in place. Fixes unoplatform#25650 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 240894 found UI Test snapshots differences: Details
|
jonpryor
approved these changes
Oct 23, 2026
Contributor
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
jonpryor
reviewed
Oct 23, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 241084 found UI Test snapshots differences: Details
|
Contributor
|
|
2 of 5 tasks
MartinZikmund
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: closes #25650
PR Type:
🐞 Bugfix
What changed? 🚀
On the macOS desktop host,
AppWindow.PositionandAppWindow.Moveused AppKit's frame origin as-is: the window's bottom-left corner, with Y growing upward. A larger Y therefore moved the window up, unlike WinUI.This was found while investigating the macOS failures of #25492. On the small display of the macOS 27 CI agents, the window already touches the top of the screen.
When_Move's "move down 10" then became "move up 10", which AppKit refuses, so the position never changed. On a larger display the window moves the wrong way and the test still passes, because it reads back the same unflipped value it set.Changes in
UNOWindow.m:Move,uno_window_get_positionandwindowDidMovenow use the window's top-left corner with Y growing down, flipped against the primary screen's top edge.uno_window_convert_local_to_screenalready did this.Resizekeeps the top-left corner in place, as WinUI does. Before, it kept the bottom-left corner, which now would movePosition.windowDidResizealso reports the position, since resizing from the top edge moves the top-left corner without raisingwindowDidMove.New runtime tests compare against where the platform puts the window content on screen (
ConvertLocalToScreen), not against the valueMovestored:When_Move_Down_Then_Window_Moves_Down_On_ScreenWhen_Resize_Then_Top_Left_StaysValidation
All of it ran on macOS 27.0.1 with Xcode 27.1, on the SamplesApp desktop head:
Move(Y + 20)moved the window content from screen Y 222 to 202, i.e. up instead of down.Given_AppWindowtests pass (5 skipped as Win32-only or by existing conditions).PR Checklist ✅
Screenshots Compare Test Runresults.Behavior change: on macOS,
AppWindow.Positionvalues now follow WinUI (top-left, Y down). An app that compensated for the inverted Y on macOS will need to drop that workaround.🤖 Generated with Claude Code