From ef5734e223f1c72006e88c64949866656fb4da68 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 24 Jan 2023 14:06:57 +0200 Subject: [PATCH] Make TopLevel not can be in MirrorTransform state --- src/Avalonia.Controls/TopLevel.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Avalonia.Controls/TopLevel.cs b/src/Avalonia.Controls/TopLevel.cs index ff241dce7a..fc88055e01 100644 --- a/src/Avalonia.Controls/TopLevel.cs +++ b/src/Avalonia.Controls/TopLevel.cs @@ -606,6 +606,13 @@ namespace Avalonia.Controls KeyboardDevice.Instance?.SetFocusedElement(null, NavigationMethod.Unspecified, KeyModifiers.None); } + protected override bool BypassFlowDirectionPolicies => true; + + public override void InvalidateMirrorTransform() + { + // Do nothing becuase TopLevel should't apply MirrorTransform on himself. + } + ITextInputMethodImpl? ITextInputMethodRoot.InputMethod => (PlatformImpl as ITopLevelImplWithTextInputMethod)?.TextInputMethod; }