Skip to content

Android: implement Window::safe_area#4506

Open
nicoburns wants to merge 1 commit intorust-windowing:masterfrom
nicoburns:android-safe-area
Open

Android: implement Window::safe_area#4506
nicoburns wants to merge 1 commit intorust-windowing:masterfrom
nicoburns:android-safe-area

Conversation

@nicoburns
Copy link
Contributor

Implements Window::safe_area for Android. This replaces the platform-specific WindowExtAndroid::content_rect method.

Android provides the top and right coordinates as offsets from the top left (0, 0) point rather than as insets from the nearest side. So these are subtracted from the outer size to normalize them according the existing semantics of Window::safe_area.

  • 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

@nicoburns nicoburns requested a review from MarijnS95 as a code owner March 7, 2026 01:09
@nicoburns nicoburns force-pushed the android-safe-area branch from 19e5226 to 11166d1 Compare March 7, 2026 01:11
@nicoburns nicoburns changed the title Implement Window::safe_area for android Android: implement Window::safe_area Mar 7, 2026
Signed-off-by: Nico Burns <nico@nicoburns.com>
@nicoburns nicoburns force-pushed the android-safe-area branch from 11166d1 to bd06339 Compare March 7, 2026 01:14
@madsmtm madsmtm added the DS - android Affects the Android backend label Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DS - android Affects the Android backend

Development

Successfully merging this pull request may close these issues.

2 participants