Browse Source

Merge branch 'master' into fixes/macCaretPosition

pull/11021/head
Benedikt Stebner 4 years ago
committed by GitHub
parent
commit
e7ed4fb1f0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Base/Media/TextFormatting/TextLayout.cs
  2. 12
      src/Windows/Avalonia.Win32/Input/Imm32InputMethod.cs

2
src/Avalonia.Base/Media/TextFormatting/TextLayout.cs

@ -174,7 +174,7 @@ namespace Avalonia.Media.TextFormatting
foreach (var textLine in _textLines) foreach (var textLine in _textLines)
{ {
textLine.Draw(context, new Point(currentX + textLine.Start, currentY)); textLine.Draw(context, new Point(currentX, currentY));
currentY += textLine.Height; currentY += textLine.Height;
} }

12
src/Windows/Avalonia.Win32/Input/Imm32InputMethod.cs

@ -85,16 +85,18 @@ namespace Avalonia.Win32.Input
_parent = parent; _parent = parent;
var langId= PRIMARYLANGID(LGID(HKL)); var langId = PRIMARYLANGID(LGID(HKL));
if(langId != _langId) if (IsActive)
{ {
DisableImm(); if (langId != _langId)
{
DisableImm();
EnableImm();
}
} }
_langId = langId; _langId = langId;
EnableImm();
} }
public void ClearLanguageAndWindow() public void ClearLanguageAndWindow()

Loading…
Cancel
Save