mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-04 11:50:15 +01:00
🎨 Improve input compatibility on some Linux desktop systems https://github.com/siyuan-note/siyuan/issues/17113
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
91a773e6af
commit
5145f7158f
1 changed files with 17 additions and 0 deletions
|
|
@ -62,6 +62,23 @@ if (!app.requestSingleInstanceLock()) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (process.platform === 'linux') {
|
||||
const desktop = (process.env.XDG_CURRENT_DESKTOP || '').toUpperCase();
|
||||
const isChineseOS = [
|
||||
'DDE', // 统信
|
||||
'DEEPIN', // 统信
|
||||
'UKUI', // 银河麒麟
|
||||
'KYLIN', // 麒麟备用标识
|
||||
'NEWSTART' // 中兴新支点
|
||||
].some(key => desktop.includes(key));
|
||||
const isKylinFile = fs.existsSync('/etc/kylin-release');
|
||||
const isUosFile = fs.existsSync('/etc/uos-version');
|
||||
const isDeepinFile = fs.existsSync('/etc/deepin-release');
|
||||
if (isChineseOS || isKylinFile || isUosFile || isDeepinFile) {
|
||||
app.commandLine.appendSwitch('ozone-platform', 'x11');
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
firstOpen = !fs.existsSync(path.join(confDir, "workspace.json"));
|
||||
if (!fs.existsSync(confDir)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue