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

@@ -1,20 +1,26 @@
/**
* TitleBar Component
* macOS: empty drag region (native traffic lights handled by hiddenInset).
* Windows/Linux: drag region on left, minimize/maximize/close on right.
* Windows: drag region with custom minimize/maximize/close controls.
* Linux: use native window chrome (no custom title bar).
*/
import { useState, useEffect } from 'react';
import { Minus, Square, X, Copy } from 'lucide-react';
import { invokeIpc } from '@/lib/api-client';
const isMac = window.electron?.platform === 'darwin';
export function TitleBar() {
if (isMac) {
const platform = window.electron?.platform;
if (platform === 'darwin') {
// macOS: just a drag region, traffic lights are native
return <div className="drag-region h-10 shrink-0 border-b bg-background" />;
}
// Linux keeps the native frame/title bar for better IME compatibility.
if (platform !== 'win32') {
return null;
}
return <WindowsTitleBar />;
}