Skip to content

[macOS] Maximize leaves the presenter Restored when the window already fills the screen #25726

Closed

Description

@ramezgerges

Current behavior 🐛

On macOS (Skia desktop), OverlappedPresenter.Maximize() leaves State at Restored when the window already fills the screen.

uno_window_maximize only calls zoom: when AppKit reports the window as not zoomed, and only the zoom: override records the presenter state. A window that already has its zoomed frame is skipped, so nothing records Maximized. On a small display this is the common case: AppKit fits a new window to the visible screen area, which is also its zoomed frame.

This fails Given_AppWindowTitleBar.When_TitleBar_Hidden_On_MacOS_Presenter_Commands_Work on CI's macOS 27 agents, whose usable height is 649 px.

The same small display also fails two tests that grow the window past the screen, which AppKit refuses:

  • Given_AppWindow.When_Resize: 1034×659 requested, 1034×649 reported.
  • Given_AppWindow.When_Resize_Before_Activate.

Expected behavior 🎯

Maximize() reports Maximized, as WinUI does, even when the window is already as large as maximizing would make it.

How to reproduce it (as minimally and precisely as possible) 🔬

  1. Activate a window and call Maximize(). Note Position and Size.
  2. Call Restore(), then Move and Resize the window back to that position and size.
  3. Call Maximize(). State stays Restored.

Workaround 🛠️

None.

Affected platforms 📱💻🖥️

Skia (macOS)

Uno.Sdk version (and other relevant versions) 📦

master (Uno 7.0 dev)

IDE version 🧑‍💻

No response

Anything else we need to know? 💬

Seen in the macOS Skia runtime tests on the .NET 11 rc.2 PR (#25492).

Activity

  1. added
    kind/bug
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions