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:
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
@@ -2194,7 +2194,7 @@ function registerUsageHandlers(): void {
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Window control handlers (for custom title bar on Windows/Linux)
|
||||
* Window control handlers (for custom title bar on Windows)
|
||||
*/
|
||||
function registerWindowHandlers(mainWindow: BrowserWindow): void {
|
||||
ipcMain.handle('window:minimize', () => {
|
||||
|
||||
Reference in New Issue
Block a user