Skip to content

Conversation

@AndrewJSchoen
Copy link

  • Tested on all platforms changed
  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

Description:

  • Adds WindowAttributesMacOS::with_traffic_light_inset and WindowExtMacOS::set_traffic_light_inset to offset the traffic‑light buttons in logical points.
  • Applies the inset reliably across title changes, resizes, and fullscreen transitions; no effect when titlebar buttons are hidden.
  • Adds traffic_lights example for interactive adjustment (arrow keys, Shift for coarse, R reset, Esc exit).
  • Adds changelog entry in winit/src/changelog/unreleased.md.

Fixes #4436

Tests:

  • cargo check -p winit-appkit
  • cargo check -p winit --example traffic_lights

Introduces API and implementation for setting the offset of macOS window controls (traffic lights) via LogicalSize. Updates WindowExtMacOS and WindowAttributesMacOS, implements logic in window_delegate, and adds a traffic_lights.rs example demonstrating usage and interactive adjustment.
Updates documentation, example usage, and changelog to reflect the new macOS traffic light placement API.
Better handles non-macOS platforms for CI
@AndrewJSchoen
Copy link
Author

I think this should be ready to go if everything checks out with the owners.

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.

Support insetting the macOS window buttons

1 participant