From e9200b7e4b107aea9045b2e013f0a9ca5e355456 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 2 Jul 2026 18:01:03 +0200 Subject: fix(engine): only lock cursor when window is focused --- engine/src/windowing.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engine/src') diff --git a/engine/src/windowing.rs b/engine/src/windowing.rs index 38b8ab1..c541f7f 100644 --- a/engine/src/windowing.rs +++ b/engine/src/windowing.rs @@ -849,6 +849,10 @@ impl ApplicationHandler for App return; }; + if !window.has_focus() { + return; + } + let window_size = window.inner_size(); if let Err(err) = -- cgit v1.2.3-18-g5258