Skip to content

AppKit: Expose native transition state#4610

Open
yay wants to merge 2 commits into
rust-windowing:masterfrom
yay:steady/macos-native-transition-state
Open

AppKit: Expose native transition state#4610
yay wants to merge 2 commits into
rust-windowing:masterfrom
yay:steady/macos-native-transition-state

Conversation

@yay

@yay yay commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

This exposes AppKit native transition state through WindowExtMacOS:

  • WindowExtMacOS::is_live_resizing() for AppKit live-resize transitions.
  • WindowExtMacOS::is_fullscreen_transition() for native fullscreen enter/exit transitions.

It also keeps macOS maximized state cached so callers can poll Window::is_maximized() without forcing NSWindow.isZoomed to temporarily mutate window style masks, and requests a final redraw when AppKit completes native fullscreen transitions.

Motivation

Renderer integrations need to know when AppKit is driving native window transitions so they can synchronize surface presentation and avoid stale or stretched frames during live resize and fullscreen animations.

For a specific example see this egui PR emilk/egui#8280 that depends on this winit PR.

Checks

  • cargo +nightly fmt --check
  • cargo check -p winit --all-features

Comment thread winit-appkit/src/window_delegate.rs
@yay yay force-pushed the steady/macos-native-transition-state branch from 67ace9c to 086c209 Compare June 30, 2026 14:31
@yay yay marked this pull request as ready for review June 30, 2026 15:58
@yay yay requested a review from madsmtm as a code owner June 30, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant