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