iOS: can change home indicator / status bar during runtime (#17204)

# Objective

- Followup on
https://github.com/bevyengine/bevy/pull/17179#pullrequestreview-2531852653
- Can show / hide home indicator / status bar during runtime

## Solution

- react on window change

## Testing

- Tested on iOS
This commit is contained in:
François Mockers 2025-01-07 02:07:18 +01:00 committed by GitHub
parent 9f18fa695d
commit b4442bc30e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -550,8 +550,15 @@ pub(crate) fn changed_windows(
_ => winit_window.recognize_pan_gesture(false, 0, 0),
}
}
}
if window.prefers_home_indicator_hidden != cache.window.prefers_home_indicator_hidden {
winit_window
.set_prefers_home_indicator_hidden(window.prefers_home_indicator_hidden);
}
if window.prefers_status_bar_hidden != cache.window.prefers_status_bar_hidden {
winit_window.set_prefers_status_bar_hidden(window.prefers_status_bar_hidden);
}
}
cache.window = window.clone();
}
}