fix linux bug

This commit is contained in:
mrvnklm
2021-11-10 11:34:45 +01:00
parent df325082fe
commit c39d9e8bb0
3 changed files with 253 additions and 4648 deletions

7
app.js
View File

@@ -549,8 +549,6 @@ const createTray = () => {
}
}, 100);
});
if (process.platform === "linux") tray.setContextMenu(getMenu());
};
const setWindowFocusTimer = () => {
@@ -582,11 +580,12 @@ app.on("ready", async () => {
createTray();
// workaround for initial window misplacement due to traybounds being incorrect
while (tray.getBounds().x === 0 || process.uptime() >= 1) {
while (tray.getBounds().x === 0 && process.uptime() <= 1) {
await delay(15);
}
createMainWindow(!store.has("currentInstance"));
if (process.platform === "linux") tray.setContextMenu(getMenu());
startAvailabilityCheck();
// register shortcut