diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs index 3935706b068fb..7d2212667cc30 100644 --- a/crates/bevy_window/src/window.rs +++ b/crates/bevy_window/src/window.rs @@ -182,7 +182,7 @@ impl Window { pub fn set_cursor_lock_mode(&mut self, lock_mode: bool) { self.cursor_locked = lock_mode; self.command_queue - .push(WindowCommand::SetCursorLockMode {locked: lock_mode}); + .push(WindowCommand::SetCursorLockMode { locked: lock_mode }); } pub fn cursor_visible(&self) -> bool { @@ -191,8 +191,9 @@ impl Window { pub fn set_cursor_visibility(&mut self, visibile_mode: bool) { self.cursor_visible = visibile_mode; - self.command_queue - .push(WindowCommand::SetCursorVisibility {visible: visibile_mode}); + self.command_queue.push(WindowCommand::SetCursorVisibility { + visible: visibile_mode, + }); } pub fn mode(&self) -> WindowMode { diff --git a/crates/bevy_winit/src/winit_windows.rs b/crates/bevy_winit/src/winit_windows.rs index 68716de08ada3..774f624f46831 100644 --- a/crates/bevy_winit/src/winit_windows.rs +++ b/crates/bevy_winit/src/winit_windows.rs @@ -71,7 +71,9 @@ impl WinitWindows { let winit_window = winit_window_builder.build(&event_loop).unwrap(); - winit_window.set_cursor_grab(window.cursor_locked()).unwrap(); + winit_window + .set_cursor_grab(window.cursor_locked()) + .unwrap(); winit_window.set_cursor_visible(window.cursor_visible()); self.window_id_to_winit @@ -79,8 +81,6 @@ impl WinitWindows { self.winit_to_window_id .insert(winit_window.id(), window.id()); - - #[cfg(target_arch = "wasm32")] { use winit::platform::web::WindowExtWebSys; diff --git a/examples/window/window_settings.rs b/examples/window/window_settings.rs index 29a57d420e6d8..246775e953af5 100644 --- a/examples/window/window_settings.rs +++ b/examples/window/window_settings.rs @@ -27,13 +27,10 @@ fn change_title(time: Res