diff options
| author | HampusM <hampus@hampusmat.com> | 2026-07-02 18:01:03 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-07-02 18:01:03 +0200 |
| commit | e9200b7e4b107aea9045b2e013f0a9ca5e355456 (patch) | |
| tree | f312f1cfc49616a33cb875165491b360fa82d794 /engine/src/windowing.rs | |
| parent | 9302bb4ff8272f5aada8efe4b2f2cac5098fb2da (diff) | |
fix(engine): only lock cursor when window is focused
Diffstat (limited to 'engine/src/windowing.rs')
| -rw-r--r-- | engine/src/windowing.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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) = |
