🐛 Can't show windows on some Linux desktop systems https://github.com/siyuan-note/siyuan/issues/17141

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:
Daniel 2026-03-06 09:38:09 +08:00
parent 3d5c24519b
commit c39b25f1ef
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -63,21 +63,8 @@ if (!app.requestSingleInstanceLock()) {
}
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-version");
const isUosFile = fs.existsSync("/etc/uos-version");
const isDeepinFile = fs.existsSync("/etc/deepin-version");
if (isChineseOS || isKylinFile || isUosFile || isDeepinFile) {
app.commandLine.appendSwitch("enable-wayland-ime");
app.commandLine.appendSwitch("wayland-text-input-version", "3");
}
app.commandLine.appendSwitch("enable-wayland-ime");
app.commandLine.appendSwitch("wayland-text-input-version", "3");
}
try {