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:
@@ -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 />;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user