mirror of https://github.com/keeweb/keeweb
added a workaround for tray issue in ubuntu
parent
b7475a8d4c
commit
ac00b77fc4
|
@ -23,6 +23,7 @@ if (!htmlPath) {
|
|||
}
|
||||
|
||||
app.setPath('userData', path.join(tempUserDataPath, tempUserDataPathRand));
|
||||
setEnv();
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (restartPending) {
|
||||
|
@ -356,6 +357,13 @@ function subscribePowerEvents() {
|
|||
});
|
||||
}
|
||||
|
||||
function setEnv() {
|
||||
if (process.platform === 'linux' && ['Pantheon', 'Unity:Unity7'].indexOf(process.env.XDG_CURRENT_DESKTOP) !== -1) {
|
||||
// https://github.com/electron/electron/issues/9046
|
||||
process.env.XDG_CURRENT_DESKTOP = 'Unity';
|
||||
}
|
||||
}
|
||||
|
||||
function deleteOldTempFiles() {
|
||||
setTimeout(() => {
|
||||
for (const dir of fs.readdirSync(tempUserDataPath)) {
|
||||
|
|
Loading…
Reference in New Issue