浏览代码

Alpine: Prevent duplicated reporting of display activation

Alessandro Pignotti 9 月之前
父节点
当前提交
d28c611806
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/lib/WebVM.svelte

+ 4 - 0
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