diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index 0719878eb..5b87d0ced 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -5152,8 +5152,10 @@ impl Game<'_> { if self.lan_acting.is_some() { return; } - // MouseHandler.grabMouse never captures an inactive window. - if capture && !self.focused { + // MouseHandler.grabMouse never captures an inactive window, and vanilla + // grabs only on `setScreen(null)`: the pack prompt and server dialogs + // are screens over the world that keep the pointer. + if capture && (!self.focused || self.server_packs.prompt.is_some() || self.dialog_open()) { return; } // The container screen's press state belongs to the screen: a screen diff --git a/crates/horizon-client/src/game/server_packs.rs b/crates/horizon-client/src/game/server_packs.rs index 58d25de0e..92bca689b 100644 --- a/crates/horizon-client/src/game/server_packs.rs +++ b/crates/horizon-client/src/game/server_packs.rs @@ -244,6 +244,8 @@ impl Game<'_> { open.requests.push((p.id, p.url, p.hash)); open.required = p.required; open.prompt = text; + // Gui.setScreen: KeyMapping.releaseAll, so no walking behind the prompt. + self.keys.clear(); self.capture(false); } /// `handleResourcePackPop`: one pack, or all of them.