From bcad6e6d3586981175cd3b07d189fbebebb65760 Mon Sep 17 00:00:00 2001 From: MaxKoll Date: Wed, 19 May 2021 17:59:58 +0200 Subject: [PATCH] Main: Hide console windows on execution. As a consequence, window focus is never lost and does not need to be regained. This seems to apply only to Windows, not Linux or OS X. --- content/main.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/content/main.js b/content/main.js index 80ac5d3..88ca553 100644 --- a/content/main.js +++ b/content/main.js @@ -147,6 +147,7 @@ var tblatex = { var init_process = function(path) { var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess); process.init(path); + process.startHidden = true; return process; } var sanitize_arg = function(arg) { @@ -369,14 +370,6 @@ var tblatex = { log += ("*** Path is "+png_file.path+"\n"); } - // We must leave some time for the window manager to actually get rid of the - // old terminal windows that pop up on Windows when launching latex. - if (isWindows) { - setTimeout(function () { - window.focus(); - }, 500); - } - // Read the depth (distance between base of image and baseline) from the depth file if (!depth_file.exists()) { log += "dvipng did not output a depth file. Continuing without alignment.\n";