From 1f98dbb9394926a0521a505550801e9c996837fc Mon Sep 17 00:00:00 2001 From: Felitendo Date: Sat, 19 Sep 2026 02:22:45 +0200 Subject: [PATCH] fix: keep the launcher behind a still-running instance --- ...game-while-another-instance-is-runni.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 patches/0033-Stay-behind-the-game-while-another-instance-is-runni.patch diff --git a/patches/0033-Stay-behind-the-game-while-another-instance-is-runni.patch b/patches/0033-Stay-behind-the-game-while-another-instance-is-runni.patch new file mode 100644 index 0000000..ac4b0a9 --- /dev/null +++ b/patches/0033-Stay-behind-the-game-while-another-instance-is-runni.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Modrinth Enhanced +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 | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/packages/app-lib/src/state/process.rs b/packages/app-lib/src/state/process.rs +index e9aaa3a..a4b24d0 100644 +--- a/packages/app-lib/src/state/process.rs ++++ b/packages/app-lib/src/state/process.rs +@@ -1064,8 +1064,12 @@ impl Process { + let _ = state.friends_socket.update_status(None).await; + + // If in tauri, window should show itself again after process exists if it was hidden ++ // ++ // Only once the last instance is gone, though: 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 window = crate::EventState::get_main_window().await?; + if let Some(window) = window { + window.unminimize()?;