mirror of
https://github.com/Ximi1970/systray-x.git
synced 2025-11-06 13:25:49 +01:00
Minimize on startup by app only
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user