You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[macOS] AppWindow.Position and Move use a bottom-left origin, so Y is inverted #25650
On the macOS desktop host, AppWindow.Position and AppWindow.Move use AppKit's frame origin as-is: the window's bottom-left corner, with Y measured upward from the bottom of the screen. Increasing Y therefore moves the window up.
Measured on macOS 27.0.1 (1920x1080) with the window bounds reported by CGWindowListCopyWindowInfo (top-left origin, Y down, the same convention as WinUI):
AppWindow.Position
Window top-left on screen
Before Move
(0, 90)
(0, 194)
After Move(new PointInt32(10, 100))
(10, 100)
(10, 184)
The window moved up 10px. Position.Y is 1080 - 194 - 796 (window height) = 90, the distance from the bottom of the screen to the bottom of the window. Likewise, Move(new PointInt32(40, 40)) places a window 40px above the bottom of the screen.
Given_AppWindow.When_Move cannot catch this because it reads back the same unflipped value it set. It only fails when the window is already at the top of the screen: AppKit then refuses to move the title bar under the menu bar, so the position does not change (seen on the small display of the macOS 27 CI agents).
Expected behavior 🎯
As in WinUI, AppWindow.Position is the window's top-left corner in screen coordinates with Y growing downward, and Move with a larger Y moves the window down.
How to reproduce it (as minimally and precisely as possible) 🔬
On the macOS desktop target, read appWindow.Position.
uno_window_convert_local_to_screen in the same file already flips Y against the primary screen, so ConvertLocalToScreen and AppWindow.Position currently disagree.
Found while investigating the macOS failures of #25492.
Activity
fix(macos): Flip AppWindow position to top-left