Skip to content

Commit

Permalink
iOS: can change home indicator / status bar during runtime (#17204)
Browse files Browse the repository at this point in the history
# Objective

- Followup on
#17179 (review)
- Can show / hide home indicator / status bar during runtime

## Solution

- react on window change

## Testing

- Tested on iOS
  • Loading branch information
mockersf authored Jan 7, 2025
1 parent 9f18fa6 commit b4442bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/bevy_winit/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit b4442bc

Please sign in to comment.