diff --git a/openless-all/app/src/App.tsx b/openless-all/app/src/App.tsx index 4ac85447..ff5dd5fc 100644 --- a/openless-all/app/src/App.tsx +++ b/openless-all/app/src/App.tsx @@ -17,6 +17,7 @@ import { windowMouseHotkeyCode, } from './lib/windowHotkeyFallback'; import { QaPanel } from './pages/QaPanel'; +import { invoke } from '@tauri-apps/api/core'; import { HotkeySettingsProvider } from './state/HotkeySettingsContext'; interface AppProps { @@ -37,7 +38,7 @@ export function App({ isCapsule, isQa, forcedOs }: AppProps) { const os = forcedOs ?? detectOS(); // Windows 启动不应被权限探测阻塞首屏。 - const [gate, setGate] = useState(isTauri ? 'ready' : 'ready'); + const [gate, setGate] = useState('ready'); useEffect(() => { if (!isTauri) return; @@ -168,6 +169,18 @@ export function App({ isCapsule, isQa, forcedOs }: AppProps) { }; }, [os]); + // Linux: 检测 WEBKIT_DISABLE_COMPOSITING_MODE → 触发磨砂 fallback(#570, #553) + useEffect(() => { + if (!isTauri) return; + invoke('is_no_compositing_mode').then((val) => { + if (val) { + document.documentElement.dataset.olNoCompositing = 'true'; + } + }).catch((err) => { + console.warn('[startup] is_no_compositing_mode failed', err); + }); + }, []); + return ( {gate === 'onboarding' ? setGate('ready')} /> : }