server packs: the download prompt keeps the pointer and stops the walking behind it

This commit is contained in:
iLostName
2026-10-27 14:05:45 +01:00
parent 12e0094f1f
commit 560aa61e91
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -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
@@ -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.