diff --git a/crates/bevy_window/src/system.rs b/crates/bevy_window/src/system.rs
index 6cb17b877ab8f..4cf79fa54997e 100644
--- a/crates/bevy_window/src/system.rs
+++ b/crates/bevy_window/src/system.rs
@@ -1,4 +1,4 @@
-use crate::{Window, WindowCloseRequested, WindowFocused, WindowId, Windows};
+use crate::{Window, WindowCloseRequested, Windows};
use bevy_app::AppExit;
use bevy_ecs::prelude::*;
@@ -36,22 +36,10 @@ pub fn close_when_requested(
/// Close the focused window whenever the escape key (Esc) is pressed
///
/// This is useful for examples or prototyping.
-pub fn close_on_esc(
- mut focused: Local