On Web, fix no-op for Window::set_fullscreen

This commit is contained in:
dAxpeDDa 2023-03-26 17:19:26 +02:00 committed by daxpedda
parent 8092fa2440
commit ba5ad3be13
4 changed files with 38 additions and 4 deletions

View file

@ -941,6 +941,10 @@ impl Window {
/// - **Wayland:** Does not support exclusive fullscreen mode and will no-op a request.
/// - **Windows:** Screen saver is disabled in fullscreen mode.
/// - **Android / Orbital:** Unsupported.
/// - **Web:** Does nothing without a [transient activation], but queues the request
/// for the next activation.
///
/// [transient activation]: https://developer.mozilla.org/en-US/docs/Glossary/Transient_activation
#[inline]
pub fn set_fullscreen(&self, fullscreen: Option<Fullscreen>) {
self.window.set_fullscreen(fullscreen.map(|f| f.into()))