Repository navigation
fix(macos): Report Maximized when the window already fills the screen - #25727
Merged
ramezgerges merged 5 commits intoOct 27, 2026
Merged
ramezgerges merged 5 commits into
ramezgerges merged 5 commits into
Conversation
ramezgerges
force-pushed
the
dev/rara/macos-small-screen-window
branch
from
October 27, 2026 01:18
4727d88 to
a5e7d36
Compare
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 241572 found UI Test snapshots differences: Details
|
CI's macOS VMs have a 1024x768 display, leaving a 1024x649 usable area once the menu bar and Dock are taken out. AppKit caps a visible window at that height and fits a window to the whole area when it is first shown, so: - When_Resize grew a window that already filled the area, and the height stayed at 649; it now shrinks the window instead; - When_Resize_Before_Activate grew a new 1024x768 window to 1034x778, which showing it fitted back to 1024x649; it now resizes to 600x400. Also covers Maximize on a window that already has its maximized frame. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Maximize skipped zoom: when AppKit said the window was already zoomed, and only zoom: records the presenter state, so a window that filled a small screen stayed Restored. It now records Maximized in that case. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ramezgerges
force-pushed
the
dev/rara/macos-small-screen-window
branch
from
October 27, 2026 18:36
a5e7d36 to
ca84a0c
Compare
unoplatform#25492 disabled When_Resize, When_Resize_Before_Activate and When_TitleBar_Hidden_On_MacOS_Presenter_Commands_Work on macOS when CI moved to the xcode-27 image, whose 1024x649 usable area they did not fit. The previous two commits fit the resize tests to small screens and report Maximized for a window that already fills the screen, so they run again. Fixes unoplatform#25728. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ramezgerges
enabled auto-merge
October 27, 2026 18:36
Xiaoy312
approved these changes
Oct 27, 2026
ajpinedam
approved these changes
Oct 27, 2026
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
When_Window_Resized grew a window that can already fill a small screen, and left its dialog open as a back-button listener, which made Given_Flyout.BackButtonIntegration fail after it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2 of 5 tasks
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 241770 found UI Test snapshots differences: Details
|
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 #25726, closes #25728
PR Type:
🐞 Bugfix
What changed? 🚀
Three macOS window tests failed on #25492, which moved the macOS lanes from the
macOS-26image toxcode-27. #25492 has since merged with the three tests disabled on macOS (#25728); this PR fixes them and turns them back on. Those VMs have a 1024×768 display, which leaves a 1024×649 usable area once the menu bar and Dock are taken out. The tests pass onmacOS-26only because its display is larger: the screen-size limits below are AppKit's, not new Uno behaviour. One failure is a real bug; the other two were tests that couldn't work on a screen that small.The bug:
Maximize()reportedRestoredfor a window that already fills the screen.uno_window_maximizeskipszoom:when AppKit says the window is already zoomed. Only thezoom:override records the presenter state, so nothing recordedMaximized. On a small screen that's the normal case, because AppKit fits a new window to the visible area, which is also its zoomed frame. The function now recordsMaximizedin that case. This is what failedGiven_AppWindowTitleBar.When_TitleBar_Hidden_On_MacOS_Presenter_Commands_Work.The tests: AppKit caps a visible window at the usable height, and fits a window to the whole usable area when it is first shown.
Given_AppWindow.When_Resizegrew the main test window, which already filled the area, by 10 px. 1034×659 was requested; the width was kept and the height stayed at 649. It now shrinks the window instead.Given_AppWindow.When_Resize_Before_Activategrew a new 1024×768 window to 1034×778. That worked while the window was hidden (the first size check passed), but showing it fitted it back to 1024×649, so the check afterActivate()failed. It now resizes to 600×400, which fits any screen.Re-enabled: the
PlatformConditionexclusions onWhen_ResizeandWhen_Resize_Before_Activateand the[Ignore]onWhen_TitleBar_Hidden_On_MacOS_Presenter_Commands_Workthat #25492 added are removed. Rebased onto master, so this PR's CI runs them on thexcode-27image itself.New test:
When_Window_Already_Has_Its_Maximized_Frame_Then_Maximize_Reports_Maximized(macOS). It recreates the small-screen case on any display:StatebecomesMaximized.Validation
On a Mac (macOS 27.0.1, Apple M2, desktop SamplesApp, Skia). To reproduce CI's screen, a 1024×768 virtual display was created with CoreGraphics'
CGVirtualDisplayand made the main display.xcode-27)UNOWindow.mfix)Given_AppWindow+Given_AppWindowTitleBar: 19 passed, 2 failed (the title-bar test and the new test)PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code