Implement architecture improvements for 1.0 release
Priority 1 - Stability: - Dirty region invalidation in SkiaRenderingEngine - Font fallback chain (FontFallbackManager) for emoji/CJK/international text - Input method polish with Fcitx5 support alongside IBus Priority 2 - Platform Integration: - Portal file picker (PortalFilePickerService) with zenity/kdialog fallback - System theme detection (SystemThemeService) for GNOME/KDE/XFCE/etc - Notification actions support with D-Bus callbacks Priority 3 - Performance: - GPU acceleration (GpuRenderingEngine) with OpenGL, software fallback - Virtualization manager (VirtualizationManager) for list recycling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,7 @@ public static class InputMethodServiceFactory
|
||||
return imePreference.ToLowerInvariant() switch
|
||||
{
|
||||
"ibus" => CreateIBusService(),
|
||||
"fcitx" or "fcitx5" => CreateFcitx5Service(),
|
||||
"xim" => CreateXIMService(),
|
||||
"none" => new NullInputMethodService(),
|
||||
_ => CreateAutoService()
|
||||
@@ -56,13 +57,30 @@ public static class InputMethodServiceFactory
|
||||
|
||||
private static IInputMethodService CreateAutoService()
|
||||
{
|
||||
// Try IBus first (most common on modern Linux)
|
||||
// Check GTK_IM_MODULE for hint
|
||||
var imModule = Environment.GetEnvironmentVariable("GTK_IM_MODULE")?.ToLowerInvariant();
|
||||
|
||||
// Try Fcitx5 first if it's the configured IM
|
||||
if (imModule?.Contains("fcitx") == true && Fcitx5InputMethodService.IsAvailable())
|
||||
{
|
||||
Console.WriteLine("InputMethodServiceFactory: Using Fcitx5");
|
||||
return CreateFcitx5Service();
|
||||
}
|
||||
|
||||
// Try IBus (most common on modern Linux)
|
||||
if (IsIBusAvailable())
|
||||
{
|
||||
Console.WriteLine("InputMethodServiceFactory: Using IBus");
|
||||
return CreateIBusService();
|
||||
}
|
||||
|
||||
// Try Fcitx5 as fallback
|
||||
if (Fcitx5InputMethodService.IsAvailable())
|
||||
{
|
||||
Console.WriteLine("InputMethodServiceFactory: Using Fcitx5");
|
||||
return CreateFcitx5Service();
|
||||
}
|
||||
|
||||
// Fall back to XIM
|
||||
if (IsXIMAvailable())
|
||||
{
|
||||
@@ -88,6 +106,19 @@ public static class InputMethodServiceFactory
|
||||
}
|
||||
}
|
||||
|
||||
private static IInputMethodService CreateFcitx5Service()
|
||||
{
|
||||
try
|
||||
{
|
||||
return new Fcitx5InputMethodService();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"InputMethodServiceFactory: Failed to create Fcitx5 service - {ex.Message}");
|
||||
return new NullInputMethodService();
|
||||
}
|
||||
}
|
||||
|
||||
private static IInputMethodService CreateXIMService()
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user