mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
parent
383e9d4e46
commit
7ef591f3a8
@ -100,7 +100,10 @@ export default class ElectronAppWrapper {
|
||||
webviewTag: true,
|
||||
// We start with a hidden window, which is then made visible depending on the showTrayIcon setting
|
||||
// https://github.com/laurent22/joplin/issues/2031
|
||||
show: debugEarlyBugs,
|
||||
//
|
||||
// On Linux/GNOME, however, the window doesn't show correctly if show is false initially:
|
||||
// https://github.com/laurent22/joplin/issues/8256
|
||||
show: debugEarlyBugs || shim.isGNOME(),
|
||||
};
|
||||
|
||||
// Linux icon workaround for bug https://github.com/electron-userland/electron-builder/issues/2098
|
||||
|
@ -494,7 +494,7 @@ class Application extends BaseApplication {
|
||||
}, 1000 * 60 * 60);
|
||||
|
||||
if (Setting.value('startMinimized') && Setting.value('showTrayIcon')) {
|
||||
// Keep it hidden
|
||||
bridge().window().hide();
|
||||
} else {
|
||||
bridge().window().show();
|
||||
}
|
||||
|
@ -57,6 +57,13 @@ const shim = {
|
||||
return process && process.platform === 'linux';
|
||||
},
|
||||
|
||||
isGNOME: () => {
|
||||
// XDG_CURRENT_DESKTOP may be something like "ubuntu:GNOME" and not just "GNOME".
|
||||
// Thus, we use .includes and not ===.
|
||||
return (shim.isLinux() || shim.isFreeBSD())
|
||||
&& process && (process.env['XDG_CURRENT_DESKTOP'] ?? '').includes('GNOME');
|
||||
},
|
||||
|
||||
isFreeBSD: () => {
|
||||
return process && process.platform === 'freebsd';
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user