From 06ec8f1049bb6b2dd4fb802730df798f4d31fd5c Mon Sep 17 00:00:00 2001 From: Ximi1970 Date: Thu, 31 Dec 2020 16:43:02 +0100 Subject: [PATCH] Minimize on startup by app only --- webext/background.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/webext/background.js b/webext/background.js index 7b20b02..1960ad1 100644 --- a/webext/background.js +++ b/webext/background.js @@ -23,11 +23,6 @@ SysTrayX.Messaging = { filters: undefined, init: function () { - // Minimize on startup handled by Companion app as backup - if (SysTrayX.startupState == "minimized") { - SysTrayX.Link.postSysTrayXMessage({ window: "minimized_all_startup" }); - } - // Send the startup positions? if (SysTrayX.restorePositions) { SysTrayX.Link.postSysTrayXMessage({ @@ -35,6 +30,11 @@ SysTrayX.Messaging = { }); } + // Minimize on startup handled by Companion app as backup + if (SysTrayX.startupState == "minimized") { + SysTrayX.Link.postSysTrayXMessage({ window: "minimized_all_startup" }); + } + // Lookout for storage changes browser.storage.onChanged.addListener(SysTrayX.Messaging.storageChanged); @@ -572,11 +572,11 @@ async function start() { // Get the prefered start state const state = await getStartupState(); - if (state == "minimized") { - browser.windows.update(browser.windows.WINDOW_ID_CURRENT, { - state: "minimized", - }); - } +// if (state == "minimized") { +// browser.windows.update(browser.windows.WINDOW_ID_CURRENT, { +// state: "minimized", +// }); +// } SysTrayX.startupState = state;