27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Modrinth Enhanced <patches@modrinth-enhanced.invalid>
|
|
Date: Sat, 19 Sep 2026 02:22:32 +0200
|
|
Subject: [PATCH] Stay behind the game while another instance is running
|
|
|
|
---
|
|
packages/app-lib/src/state/process.rs | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/packages/app-lib/src/state/process.rs b/packages/app-lib/src/state/process.rs
|
|
index 4c9ea57..c242fea 100644
|
|
--- a/packages/app-lib/src/state/process.rs
|
|
+++ b/packages/app-lib/src/state/process.rs
|
|
@@ -1063,8 +1063,11 @@ impl Process {
|
|
|
|
let _ = state.friends_socket.update_status(None).await;
|
|
|
|
+ // Refocus only once the last instance is gone: while another one is
|
|
+ // still being played, taking the screen back from it is the last thing
|
|
+ // the player wants.
|
|
#[cfg(feature = "tauri")]
|
|
- {
|
|
+ if state.process_manager.get_all().is_empty() {
|
|
let settings = crate::state::Settings::get(&state.pool).await?;
|
|
if settings.refocus_on_game_close
|
|
&& let Some(window) =
|