Add logic to check whether the Korean IME is in use

This commit is contained in:
DB p 2025-04-11 12:56:31 +09:00
parent c5f2fcaddf
commit 218635a035
2 changed files with 17 additions and 1 deletions

View file

@ -21,6 +21,10 @@ namespace Flow.Launcher.Infrastructure
{
#region Blur Handling
public static bool IsWindows11()
{
return Environment.OSVersion.Version.Major >= 10 && Environment.OSVersion.Version.Build >= 22000;
}
public static bool IsBackdropSupported()
{
// Mica and Acrylic only supported Windows 11 22000+

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
@ -205,7 +206,18 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
}
public bool KoreanIMERegistryKeyExists => Win32Helper.IsKoreanIMEExist();
public bool KoreanIMERegistryKeyExists
{
get
{
bool registryKeyExists = Win32Helper.IsKoreanIMEExist();
bool koreanLanguageInstalled = InputLanguage.InstalledInputLanguages.Cast<InputLanguage>().Any(lang => lang.Culture.Name.StartsWith("ko"));
bool isWindows11 = Win32Helper.IsWindows11();
// Return true if Windows 11 with Korean IME installed, or if the registry key exists
return (isWindows11 && koreanLanguageInstalled) || registryKeyExists;
}
}
public bool KoreanIMERegistryValueIsZero
{