mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add logic to check whether the Korean IME is in use
This commit is contained in:
parent
c5f2fcaddf
commit
218635a035
2 changed files with 17 additions and 1 deletions
|
|
@ -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+
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue