Minimize on startup by app only

This commit is contained in:
Ximi1970
2020-12-31 16:43:02 +01:00
parent 9076e476da
commit 06ec8f1049

View File

@@ -23,11 +23,6 @@ SysTrayX.Messaging = {
filters: undefined, filters: undefined,
init: function () { 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? // Send the startup positions?
if (SysTrayX.restorePositions) { if (SysTrayX.restorePositions) {
SysTrayX.Link.postSysTrayXMessage({ 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 // Lookout for storage changes
browser.storage.onChanged.addListener(SysTrayX.Messaging.storageChanged); browser.storage.onChanged.addListener(SysTrayX.Messaging.storageChanged);
@@ -572,11 +572,11 @@ async function start() {
// Get the prefered start state // Get the prefered start state
const state = await getStartupState(); const state = await getStartupState();
if (state == "minimized") { // if (state == "minimized") {
browser.windows.update(browser.windows.WINDOW_ID_CURRENT, { // browser.windows.update(browser.windows.WINDOW_ID_CURRENT, {
state: "minimized", // state: "minimized",
}); // });
} // }
SysTrayX.startupState = state; SysTrayX.startupState = state;