fix(linux): Can't change Chinese IMEs on Debian (#582)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Haze <hazeone@users.noreply.github.com>
This commit is contained in:
Haze
2026-03-19 10:19:44 +08:00
committed by GitHub
Unverified
parent 7aec2febed
commit 1b527d2f49
4 changed files with 65 additions and 7 deletions

View File

@@ -113,6 +113,8 @@ function getAppIcon(): Electron.NativeImage | undefined {
*/
function createWindow(): BrowserWindow {
const isMac = process.platform === 'darwin';
const isWindows = process.platform === 'win32';
const useCustomTitleBar = isWindows;
const win = new BrowserWindow({
width: 1280,
@@ -127,9 +129,9 @@ function createWindow(): BrowserWindow {
sandbox: false,
webviewTag: true, // Enable <webview> for embedding OpenClaw Control UI
},
titleBarStyle: isMac ? 'hiddenInset' : 'hidden',
titleBarStyle: isMac ? 'hiddenInset' : useCustomTitleBar ? 'hidden' : 'default',
trafficLightPosition: isMac ? { x: 16, y: 16 } : undefined,
frame: isMac,
frame: isMac || !useCustomTitleBar,
show: false,
});