From 50cc02182b0938d0b1c111bd0bc4946689fd0d52 Mon Sep 17 00:00:00 2001 From: Yoh Deadfall Date: Tue, 9 Nov 2021 13:40:30 +0300 Subject: [PATCH 01/22] Setting weak reference target instead of field --- src/Avalonia.Input/Gestures.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Avalonia.Input/Gestures.cs b/src/Avalonia.Input/Gestures.cs index 8d74001309..639b4ef117 100644 --- a/src/Avalonia.Input/Gestures.cs +++ b/src/Avalonia.Input/Gestures.cs @@ -30,7 +30,7 @@ namespace Avalonia.Input "ScrollGestureEnded", RoutingStrategies.Bubble, typeof(Gestures)); #pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. - private static WeakReference s_lastPress = new WeakReference(null); + private static readonly WeakReference s_lastPress = new WeakReference(null); #pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type. static Gestures() @@ -86,16 +86,15 @@ namespace Avalonia.Input #pragma warning restore CS0618 // Type or member is obsolete if (clickCount <= 1) { - s_lastPress = new WeakReference(ev.Source); + s_lastPress.SetTarget(ev.Source); } - else if (s_lastPress != null && clickCount == 2 && e.GetCurrentPoint(visual).Properties.IsLeftButtonPressed) + else if (clickCount == 2 && e.GetCurrentPoint(visual).Properties.IsLeftButtonPressed) { if (s_lastPress.TryGetTarget(out var target) && target == e.Source) { e.Source.RaiseEvent(new TappedEventArgs(DoubleTappedEvent, e)); } } - } } From 6452c17d7ae38e5bad302d83278dc3bdf397dc74 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 14:38:37 +0000 Subject: [PATCH 02/22] dont use stencil buffers. --- src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs b/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs index 0ac42277e7..ec8a8436e1 100644 --- a/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs +++ b/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs @@ -25,7 +25,7 @@ namespace Avalonia.Skia GRGlInterface.CreateOpenGl(proc => context.GlInterface.GetProcAddress(proc)) : GRGlInterface.CreateGles(proc => context.GlInterface.GetProcAddress(proc))) { - _grContext = GRContext.CreateGl(iface); + _grContext = GRContext.CreateGl(iface, new GRContextOptions { AvoidStencilBuffers = true }); if (maxResourceBytes.HasValue) { _grContext.SetResourceCacheLimit(maxResourceBytes.Value); From 9ddab6b0e591a20f5ed129ac43995a723a350f0f Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Mon, 8 Nov 2021 19:59:43 +0000 Subject: [PATCH 03/22] update harfbuzz # Conflicts: # build/HarfBuzzSharp.props --- build/HarfBuzzSharp.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/HarfBuzzSharp.props b/build/HarfBuzzSharp.props index 13419eb173..16aab3911e 100644 --- a/build/HarfBuzzSharp.props +++ b/build/HarfBuzzSharp.props @@ -1,6 +1,6 @@  - - + + From 291d379d7dc8aefa017aabd497ce5f9faa1d5eeb Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Mon, 8 Nov 2021 19:46:48 +0000 Subject: [PATCH 04/22] latest skia preview # Conflicts: # build/SkiaSharp.props --- build/SkiaSharp.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/SkiaSharp.props b/build/SkiaSharp.props index f2e7df36cd..97b29a192d 100644 --- a/build/SkiaSharp.props +++ b/build/SkiaSharp.props @@ -1,6 +1,6 @@  - - + + From e265bef95b275b092eae2a5d08a249fcc321b7f3 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 9 Nov 2021 16:31:53 +0100 Subject: [PATCH 05/22] Added failing test for #6899. --- .../Rendering/ImmediateRendererTests.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/Avalonia.Visuals.UnitTests/Rendering/ImmediateRendererTests.cs b/tests/Avalonia.Visuals.UnitTests/Rendering/ImmediateRendererTests.cs index acee9a50f5..6859b2b139 100644 --- a/tests/Avalonia.Visuals.UnitTests/Rendering/ImmediateRendererTests.cs +++ b/tests/Avalonia.Visuals.UnitTests/Rendering/ImmediateRendererTests.cs @@ -291,6 +291,24 @@ namespace Avalonia.Visuals.UnitTests.Rendering } } + [Fact] + public void Static_Render_Method_Does_Not_Update_TransformedBounds() + { + using (UnitTestApplication.Start(TestServices.MockPlatformRenderInterface)) + { + var target = new Border(); + var expected = new TransformedBounds(new Rect(1, 2, 3, 4), new Rect(4, 5, 6, 7), Matrix.CreateRotation(0.8)); + + ((IVisual)target).TransformedBounds = expected; + + var renderTarget = Mock.Of(x => + x.CreateDrawingContext(It.IsAny()) == Mock.Of()); + ImmediateRenderer.Render(target, renderTarget); + + Assert.Equal(expected, target.TransformedBounds); + } + } + private class TestControl : Control { public bool Rendered { get; private set; } From f54a75e63692fa91c19d4fc25a507349fd10bc7e Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 9 Nov 2021 16:40:57 +0100 Subject: [PATCH 06/22] Don't update transformed bounds from static render methods. Fixes #6899 --- .../Rendering/ImmediateRenderer.cs | 25 +++++++++++++++---- .../VisualTree/TransformedBoundsTests.cs | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/Avalonia.Visuals/Rendering/ImmediateRenderer.cs b/src/Avalonia.Visuals/Rendering/ImmediateRenderer.cs index 52427c4ae6..88fbd290e6 100644 --- a/src/Avalonia.Visuals/Rendering/ImmediateRenderer.cs +++ b/src/Avalonia.Visuals/Rendering/ImmediateRenderer.cs @@ -20,6 +20,7 @@ namespace Avalonia.Rendering { private readonly IVisual _root; private readonly IRenderRoot _renderRoot; + private bool _updateTransformedBounds = true; private IRenderTarget _renderTarget; /// @@ -34,6 +35,13 @@ namespace Avalonia.Rendering _renderRoot = root as IRenderRoot; } + private ImmediateRenderer(IVisual root, bool updateTransformedBounds) + { + _root = root ?? throw new ArgumentNullException(nameof(root)); + _renderRoot = root as IRenderRoot; + _updateTransformedBounds = updateTransformedBounds; + } + /// public bool DrawFps { get; set; } @@ -98,7 +106,7 @@ namespace Avalonia.Rendering /// The render target. public static void Render(IVisual visual, IRenderTarget target) { - using (var renderer = new ImmediateRenderer(visual)) + using (var renderer = new ImmediateRenderer(visual, updateTransformedBounds: false)) using (var context = new DrawingContext(target.CreateDrawingContext(renderer))) { renderer.Render(context, visual, visual.Bounds); @@ -112,7 +120,7 @@ namespace Avalonia.Rendering /// The drawing context. public static void Render(IVisual visual, DrawingContext context) { - using (var renderer = new ImmediateRenderer(visual)) + using (var renderer = new ImmediateRenderer(visual, updateTransformedBounds: false)) { renderer.Render(context, visual, visual.Bounds); } @@ -193,6 +201,12 @@ namespace Avalonia.Rendering Render(new DrawingContext(context), visual, visual.Bounds); } + internal static void Render(IVisual visual, DrawingContext context, bool updateTransformedBounds) + { + using var renderer = new ImmediateRenderer(visual, updateTransformedBounds); + renderer.Render(context, visual, visual.Bounds); + } + private static void ClearTransformedBounds(IVisual visual) { foreach (var e in visual.GetSelfAndVisualDescendants()) @@ -308,7 +322,8 @@ namespace Avalonia.Rendering new TransformedBounds(bounds, new Rect(), context.CurrentContainerTransform); #pragma warning restore 0618 - visual.TransformedBounds = transformed; + if (_updateTransformedBounds) + visual.TransformedBounds = transformed; foreach (var child in visual.VisualChildren.OrderBy(x => x, ZIndexComparer.Instance)) { @@ -321,7 +336,7 @@ namespace Avalonia.Rendering : clipRect; Render(context, child, childClipRect); } - else + else if (_updateTransformedBounds) { ClearTransformedBounds(child); } @@ -329,7 +344,7 @@ namespace Avalonia.Rendering } } - if (!visual.IsVisible) + if (!visual.IsVisible && _updateTransformedBounds) { ClearTransformedBounds(visual); } diff --git a/tests/Avalonia.Visuals.UnitTests/VisualTree/TransformedBoundsTests.cs b/tests/Avalonia.Visuals.UnitTests/VisualTree/TransformedBoundsTests.cs index 8202735e5d..54d9ce40f0 100644 --- a/tests/Avalonia.Visuals.UnitTests/VisualTree/TransformedBoundsTests.cs +++ b/tests/Avalonia.Visuals.UnitTests/VisualTree/TransformedBoundsTests.cs @@ -40,7 +40,7 @@ namespace Avalonia.Visuals.UnitTests.VisualTree tree.Measure(Size.Infinity); tree.Arrange(new Rect(0, 0, 100, 100)); - ImmediateRenderer.Render(tree, context); + ImmediateRenderer.Render(tree, context, true); var track = control.GetObservable(Visual.TransformedBoundsProperty); var results = new List(); From f9827d85017410d74ab29a54cb21dd1ec219fb4c Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Mon, 8 Nov 2021 19:59:43 +0000 Subject: [PATCH 07/22] update harfbuzz # Conflicts: # build/HarfBuzzSharp.props --- build/HarfBuzzSharp.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/HarfBuzzSharp.props b/build/HarfBuzzSharp.props index 13419eb173..16aab3911e 100644 --- a/build/HarfBuzzSharp.props +++ b/build/HarfBuzzSharp.props @@ -1,6 +1,6 @@  - - + + From 07135d556ab982431ef40a042d074e531717b9bb Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Mon, 8 Nov 2021 19:46:48 +0000 Subject: [PATCH 08/22] latest skia preview # Conflicts: # build/SkiaSharp.props --- build/SkiaSharp.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/SkiaSharp.props b/build/SkiaSharp.props index f2e7df36cd..97b29a192d 100644 --- a/build/SkiaSharp.props +++ b/build/SkiaSharp.props @@ -1,6 +1,6 @@  - - + + From b4d10d5ed9e38ec3522dad2b6b97b96398794aac Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 16:46:08 +0000 Subject: [PATCH 09/22] dotnet 6 compatibility. --- azure-pipelines.yml | 12 ++++++------ build/MicroCom.targets | 2 +- global.json | 3 --- src/tools/MicroComGenerator/MicroComGenerator.csproj | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bc8d065137..9939302cef 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,9 +9,9 @@ jobs: version: 3.1.414 - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 5.0.402' + displayName: 'Use .NET Core SDK 6.0.101' inputs: - version: 5.0.402 + version: 6.0.101 - task: CmdLine@2 displayName: 'Run Build' @@ -40,9 +40,9 @@ jobs: version: 3.1.414 - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 5.0.402' + displayName: 'Use .NET Core SDK 6.0.101' inputs: - version: 5.0.402 + version: 6.0.101 - task: CmdLine@2 displayName: 'Install Mono 5.18' @@ -110,9 +110,9 @@ jobs: version: 3.1.414 - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 5.0.402' + displayName: 'Use .NET Core SDK 6.0.101' inputs: - version: 5.0.402 + version: 6.0.101 - task: CmdLine@2 displayName: 'Install Nuke' diff --git a/build/MicroCom.targets b/build/MicroCom.targets index 49d2cdce72..1ed388f689 100644 --- a/build/MicroCom.targets +++ b/build/MicroCom.targets @@ -15,7 +15,7 @@ Inputs="@(AvnComIdl);$(MSBuildThisFileDirectory)../src/tools/MicroComGenerator/**/*.cs" Outputs="%(AvnComIdl.OutputFile)"> - diff --git a/global.json b/global.json index 9f83c1ea1e..ad41e7fea1 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,4 @@ { - "sdk": { - "version": "5.0.402" - }, "msbuild-sdks": { "Microsoft.Build.Traversal": "1.0.43", "MSBuild.Sdk.Extras": "2.0.54", diff --git a/src/tools/MicroComGenerator/MicroComGenerator.csproj b/src/tools/MicroComGenerator/MicroComGenerator.csproj index 5ae431b4b9..f2ed8b0185 100644 --- a/src/tools/MicroComGenerator/MicroComGenerator.csproj +++ b/src/tools/MicroComGenerator/MicroComGenerator.csproj @@ -1,7 +1,7 @@ Exe - netcoreapp3.1 + net6.0 From 92239a1fc222b251198735e830e0dd1b3303d86c Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 16:55:45 +0000 Subject: [PATCH 10/22] allow building on .net 6 machines. --- nukebuild/_build.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nukebuild/_build.csproj b/nukebuild/_build.csproj index e08ffd0413..ec2f917018 100644 --- a/nukebuild/_build.csproj +++ b/nukebuild/_build.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0 false False From e1cc426066f2fc8fe1c97619cd52771135e31606 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 16:57:53 +0000 Subject: [PATCH 11/22] correct dotnet version. --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9939302cef..84582fc2c1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,9 +9,9 @@ jobs: version: 3.1.414 - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 6.0.101' + displayName: 'Use .NET Core SDK 6.0.100' inputs: - version: 6.0.101 + version: 6.0.100 - task: CmdLine@2 displayName: 'Run Build' @@ -40,9 +40,9 @@ jobs: version: 3.1.414 - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 6.0.101' + displayName: 'Use .NET Core SDK 6.0.100' inputs: - version: 6.0.101 + version: 6.0.100 - task: CmdLine@2 displayName: 'Install Mono 5.18' @@ -110,9 +110,9 @@ jobs: version: 3.1.414 - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 6.0.101' + displayName: 'Use .NET Core SDK 6.0.100' inputs: - version: 6.0.101 + version: 6.0.100 - task: CmdLine@2 displayName: 'Install Nuke' From ae5ce83fd5202400baa783833a822c51f48510b7 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 17:20:22 +0000 Subject: [PATCH 12/22] Revert "allow building on .net 6 machines." This reverts commit 92239a1fc222b251198735e830e0dd1b3303d86c. --- nukebuild/_build.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nukebuild/_build.csproj b/nukebuild/_build.csproj index ec2f917018..e08ffd0413 100644 --- a/nukebuild/_build.csproj +++ b/nukebuild/_build.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + netcoreapp3.1 false False From 8a46ee060b960258faaac1fb4947773a2ccdf9a2 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 17:21:24 +0000 Subject: [PATCH 13/22] dont upgrade microcom. --- build/MicroCom.targets | 2 +- src/tools/MicroComGenerator/MicroComGenerator.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/MicroCom.targets b/build/MicroCom.targets index 1ed388f689..49d2cdce72 100644 --- a/build/MicroCom.targets +++ b/build/MicroCom.targets @@ -15,7 +15,7 @@ Inputs="@(AvnComIdl);$(MSBuildThisFileDirectory)../src/tools/MicroComGenerator/**/*.cs" Outputs="%(AvnComIdl.OutputFile)"> - diff --git a/src/tools/MicroComGenerator/MicroComGenerator.csproj b/src/tools/MicroComGenerator/MicroComGenerator.csproj index f2ed8b0185..5ae431b4b9 100644 --- a/src/tools/MicroComGenerator/MicroComGenerator.csproj +++ b/src/tools/MicroComGenerator/MicroComGenerator.csproj @@ -1,7 +1,7 @@ Exe - net6.0 + netcoreapp3.1 From 64c44c6fd1678c5ad7cb93be3bba02583d8ef5dd Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 18:12:23 +0000 Subject: [PATCH 14/22] fix sdk. --- global.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/global.json b/global.json index ad41e7fea1..e3e652761c 100644 --- a/global.json +++ b/global.json @@ -1,4 +1,7 @@ { + "sdk": { + "version": "6.0.100" + }, "msbuild-sdks": { "Microsoft.Build.Traversal": "1.0.43", "MSBuild.Sdk.Extras": "2.0.54", From 087f59712599349f345abc900a797d8d4e3bfcc5 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 18:25:55 +0000 Subject: [PATCH 15/22] workaround dotnet sdk bug --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 84582fc2c1..5f74f564f8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,3 +1,6 @@ +variables: + MSBuildEnableWorkloadResolver: 'false' + jobs: - job: Linux pool: From d4ce30decd9c384a9ba6c1255ca30766918fbf7e Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 18:29:31 +0000 Subject: [PATCH 16/22] micro com net6 with build script on netcoreapp3.1 --- azure-pipelines.yml | 3 --- build/MicroCom.targets | 2 +- nukebuild/_build.csproj | 7 +++---- src/tools/MicroComGenerator/MicroComGenerator.csproj | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5f74f564f8..84582fc2c1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,3 @@ -variables: - MSBuildEnableWorkloadResolver: 'false' - jobs: - job: Linux pool: diff --git a/build/MicroCom.targets b/build/MicroCom.targets index 49d2cdce72..1ed388f689 100644 --- a/build/MicroCom.targets +++ b/build/MicroCom.targets @@ -15,7 +15,7 @@ Inputs="@(AvnComIdl);$(MSBuildThisFileDirectory)../src/tools/MicroComGenerator/**/*.cs" Outputs="%(AvnComIdl.OutputFile)"> - diff --git a/nukebuild/_build.csproj b/nukebuild/_build.csproj index e08ffd0413..3cc9c44e4a 100644 --- a/nukebuild/_build.csproj +++ b/nukebuild/_build.csproj @@ -36,10 +36,9 @@ - - - - + + + diff --git a/src/tools/MicroComGenerator/MicroComGenerator.csproj b/src/tools/MicroComGenerator/MicroComGenerator.csproj index 5ae431b4b9..f2ed8b0185 100644 --- a/src/tools/MicroComGenerator/MicroComGenerator.csproj +++ b/src/tools/MicroComGenerator/MicroComGenerator.csproj @@ -1,7 +1,7 @@ Exe - netcoreapp3.1 + net6.0 From 1df32a964521cf0b9f7d73853d3fedcae81d14fa Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 18:30:38 +0000 Subject: [PATCH 17/22] use multitargetting. --- nukebuild/_build.csproj | 9 +++++---- src/tools/MicroComGenerator/MicroComGenerator.csproj | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/nukebuild/_build.csproj b/nukebuild/_build.csproj index 3cc9c44e4a..ec2f917018 100644 --- a/nukebuild/_build.csproj +++ b/nukebuild/_build.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0 false False @@ -36,9 +36,10 @@ - - - + + + + diff --git a/src/tools/MicroComGenerator/MicroComGenerator.csproj b/src/tools/MicroComGenerator/MicroComGenerator.csproj index f2ed8b0185..eab14760a4 100644 --- a/src/tools/MicroComGenerator/MicroComGenerator.csproj +++ b/src/tools/MicroComGenerator/MicroComGenerator.csproj @@ -1,7 +1,7 @@ Exe - net6.0 + net6.0;netcoreapp3.1 From aba3280277fba4682cf068158a4ee6af30e7ede3 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 18:40:01 +0000 Subject: [PATCH 18/22] fix net6.0 build --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 84582fc2c1..3b957a0b84 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -56,7 +56,7 @@ jobs: inputs: script: | export PATH="`pwd`/sdk:$PATH" - cd src/tools/MicroComGenerator; dotnet run -i ../../Avalonia.Native/avn.idl --cpp ../../../native/Avalonia.Native/inc/avalonia-native.h + cd src/tools/MicroComGenerator; dotnet run -f net6.0 -i ../../Avalonia.Native/avn.idl --cpp ../../../native/Avalonia.Native/inc/avalonia-native.h - task: Xcode@5 inputs: From e5a9776fc88ff07c6c70acead1c73aa14a5b0190 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 19:01:42 +0000 Subject: [PATCH 19/22] fix nuke build. --- nukebuild/_build.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nukebuild/_build.csproj b/nukebuild/_build.csproj index ec2f917018..e08ffd0413 100644 --- a/nukebuild/_build.csproj +++ b/nukebuild/_build.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + netcoreapp3.1 false False From e6669ab022ffa5c24e5083ea0a5d8b2b65d85cee Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 9 Nov 2021 19:13:00 +0000 Subject: [PATCH 20/22] net 6 sdk bug workaround. --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3b957a0b84..9fa79ec5ba 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,3 +1,6 @@ +variables: + MSBuildEnableWorkloadResolver: 'false' + jobs: - job: Linux pool: From 618f70a0f47a90fbd79a43661c85d9f890ca6a5b Mon Sep 17 00:00:00 2001 From: Yoh Deadfall Date: Wed, 10 Nov 2021 16:42:24 +0300 Subject: [PATCH 21/22] Use event args to get value instead of feild --- src/Avalonia.Input/InputElement.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Input/InputElement.cs b/src/Avalonia.Input/InputElement.cs index b5ab7b4da1..26ebf86857 100644 --- a/src/Avalonia.Input/InputElement.cs +++ b/src/Avalonia.Input/InputElement.cs @@ -632,7 +632,7 @@ namespace Avalonia.Input } else if (change.Property == IsKeyboardFocusWithinProperty) { - PseudoClasses.Set(":focus-within", _isKeyboardFocusWithin); + PseudoClasses.Set(":focus-within", change.NewValue.GetValueOrDefault()); } } From 5b2a83b1909f174fc5f6f7a636d7d5d21142b6c9 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Thu, 11 Nov 2021 11:22:09 +0100 Subject: [PATCH 22/22] Don't multi-target MicroComGenerator. Was causing problems building in VS. Instead include the source files directly into `_build.csproj`. --- nukebuild/_build.csproj | 9 +++++---- src/tools/MicroComGenerator/MicroComGenerator.csproj | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/nukebuild/_build.csproj b/nukebuild/_build.csproj index e08ffd0413..b28d3eb700 100644 --- a/nukebuild/_build.csproj +++ b/nukebuild/_build.csproj @@ -15,6 +15,7 @@ + @@ -36,10 +37,10 @@ - - - - + + MicroComGenerator\%(Filename)%(Extension) + + diff --git a/src/tools/MicroComGenerator/MicroComGenerator.csproj b/src/tools/MicroComGenerator/MicroComGenerator.csproj index eab14760a4..68895b96ca 100644 --- a/src/tools/MicroComGenerator/MicroComGenerator.csproj +++ b/src/tools/MicroComGenerator/MicroComGenerator.csproj @@ -1,8 +1,8 @@ - - Exe - net6.0;netcoreapp3.1 - + + Exe + net6.0 +