From d28c6118068b6150520a5a1d1d27300d9ce7a8c0 Mon Sep 17 00:00:00 2001 From: Alessandro Pignotti Date: Tue, 15 Oct 2024 16:47:56 +0200 Subject: [PATCH] Alpine: Prevent duplicated reporting of display activation --- src/lib/WebVM.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/WebVM.svelte b/src/lib/WebVM.svelte index 356eb7e..5b8b9bf 100644 --- a/src/lib/WebVM.svelte +++ b/src/lib/WebVM.svelte @@ -25,6 +25,7 @@ term.loadAddon(linkAddon); var cxReadFunc = null; var processCount = 0; + var curVT = 0; function writeData(buf, vt) { if(vt != 1) @@ -75,6 +76,9 @@ } function handleActivateConsole(vt) { + if(curVT == vt) + return; + curVT = vt; if(vt != 7) return; // Raise the display to the foreground