|
|
|
@ -19,6 +19,8 @@ namespace Avalonia.Win32 |
|
|
|
{ |
|
|
|
internal partial class WindowImpl |
|
|
|
{ |
|
|
|
private bool _killFocusRequested; |
|
|
|
|
|
|
|
[SuppressMessage("Microsoft.StyleCop.CSharp.NamingRules", "SA1305:FieldNamesMustNotUseHungarianNotation", |
|
|
|
Justification = "Using Win32 naming for consistency.")] |
|
|
|
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "We do .NET COM interop availability checks")] |
|
|
|
@ -680,7 +682,15 @@ namespace Avalonia.Win32 |
|
|
|
} |
|
|
|
|
|
|
|
case WindowsMessage.WM_KILLFOCUS: |
|
|
|
LostFocus?.Invoke(); |
|
|
|
if (Imm32InputMethod.Current.IsComposing) |
|
|
|
{ |
|
|
|
_killFocusRequested = true; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
LostFocus?.Invoke(); |
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case WindowsMessage.WM_INPUTLANGCHANGE: |
|
|
|
@ -725,6 +735,13 @@ namespace Avalonia.Win32 |
|
|
|
{ |
|
|
|
Imm32InputMethod.Current.HandleCompositionEnd(); |
|
|
|
|
|
|
|
if (_killFocusRequested) |
|
|
|
{ |
|
|
|
LostFocus?.Invoke(); |
|
|
|
|
|
|
|
_killFocusRequested = false; |
|
|
|
} |
|
|
|
|
|
|
|
return IntPtr.Zero; |
|
|
|
} |
|
|
|
case WindowsMessage.WM_GETOBJECT: |
|
|
|
|