diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index bc8d065137..9fa79ec5ba 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -1,3 +1,6 @@
+variables:
+ MSBuildEnableWorkloadResolver: 'false'
+
jobs:
- job: Linux
pool:
@@ -9,9 +12,9 @@ jobs:
version: 3.1.414
- task: UseDotNet@2
- displayName: 'Use .NET Core SDK 5.0.402'
+ displayName: 'Use .NET Core SDK 6.0.100'
inputs:
- version: 5.0.402
+ version: 6.0.100
- task: CmdLine@2
displayName: 'Run Build'
@@ -40,9 +43,9 @@ jobs:
version: 3.1.414
- task: UseDotNet@2
- displayName: 'Use .NET Core SDK 5.0.402'
+ displayName: 'Use .NET Core SDK 6.0.100'
inputs:
- version: 5.0.402
+ version: 6.0.100
- task: CmdLine@2
displayName: 'Install Mono 5.18'
@@ -56,7 +59,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:
@@ -110,9 +113,9 @@ jobs:
version: 3.1.414
- task: UseDotNet@2
- displayName: 'Use .NET Core SDK 5.0.402'
+ displayName: 'Use .NET Core SDK 6.0.100'
inputs:
- version: 5.0.402
+ version: 6.0.100
- task: CmdLine@2
displayName: 'Install Nuke'
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 @@
-
-
+
+
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/build/SkiaSharp.props b/build/SkiaSharp.props
index f2e7df36cd..97b29a192d 100644
--- a/build/SkiaSharp.props
+++ b/build/SkiaSharp.props
@@ -1,6 +1,6 @@
-
-
+
+
diff --git a/build/SourceLink.props b/build/SourceLink.props
index 1e007e01eb..0f77c2a613 100644
--- a/build/SourceLink.props
+++ b/build/SourceLink.props
@@ -3,7 +3,7 @@
true
false
true
- embedded
+ full
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
diff --git a/global.json b/global.json
index 9f83c1ea1e..e3e652761c 100644
--- a/global.json
+++ b/global.json
@@ -1,7 +1,7 @@
{
- "sdk": {
- "version": "5.0.402"
- },
+ "sdk": {
+ "version": "6.0.100"
+ },
"msbuild-sdks": {
"Microsoft.Build.Traversal": "1.0.43",
"MSBuild.Sdk.Extras": "2.0.54",
diff --git a/native/Avalonia.Native/src/OSX/window.mm b/native/Avalonia.Native/src/OSX/window.mm
index 094c1f7c93..d5289f5229 100644
--- a/native/Avalonia.Native/src/OSX/window.mm
+++ b/native/Avalonia.Native/src/OSX/window.mm
@@ -206,7 +206,11 @@ public:
auto window = Window;
Window = nullptr;
- [window close];
+ try{
+ // Seems to throw sometimes on application exit.
+ [window close];
+ }
+ catch(NSException*){}
}
return S_OK;
@@ -724,6 +728,7 @@ private:
if (cparent->WindowState() == Minimized)
cparent->SetWindowState(Normal);
+ [Window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
[cparent->Window addChildWindow:Window ordered:NSWindowAbove];
UpdateStyle();
@@ -2398,11 +2403,18 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
{
case NSEventTypeLeftMouseDown:
{
- auto avnPoint = [AvnView toAvnPoint:[event locationInWindow]];
- auto point = [self translateLocalPoint:avnPoint];
- AvnVector delta;
+ AvnView* view = _parent->View;
+ NSPoint windowPoint = [event locationInWindow];
+ NSPoint viewPoint = [view convertPoint:windowPoint fromView:nil];
- _parent->BaseEvents->RawMouseEvent(NonClientLeftButtonDown, [event timestamp] * 1000, AvnInputModifiersNone, point, delta);
+ if (!NSPointInRect(viewPoint, view.bounds))
+ {
+ auto avnPoint = [AvnView toAvnPoint:windowPoint];
+ auto point = [self translateLocalPoint:avnPoint];
+ AvnVector delta;
+
+ _parent->BaseEvents->RawMouseEvent(NonClientLeftButtonDown, [event timestamp] * 1000, AvnInputModifiersNone, point, delta);
+ }
}
break;
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/packages/Avalonia/AvaloniaBuildTasks.targets b/packages/Avalonia/AvaloniaBuildTasks.targets
index 3f9ccb04eb..d43a5c1624 100644
--- a/packages/Avalonia/AvaloniaBuildTasks.targets
+++ b/packages/Avalonia/AvaloniaBuildTasks.targets
@@ -88,6 +88,7 @@
$(IntermediateOutputPath)/Avalonia/references
$(IntermediateOutputPath)/Avalonia/original.dll
false
+ false
-
+
+
## .NET Foundation
diff --git a/samples/BindingDemo/BindingDemo.csproj b/samples/BindingDemo/BindingDemo.csproj
index d898b737a9..2c6ff74e5e 100644
--- a/samples/BindingDemo/BindingDemo.csproj
+++ b/samples/BindingDemo/BindingDemo.csproj
@@ -1,7 +1,7 @@
Exe
- netcoreapp3.1
+ net6.0
diff --git a/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj b/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj
index 3c2d2ee359..2d4fc45171 100644
--- a/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj
+++ b/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj
@@ -2,7 +2,7 @@
WinExe
- netcoreapp3.1
+ net6.0
true
diff --git a/samples/PlatformSanityChecks/PlatformSanityChecks.csproj b/samples/PlatformSanityChecks/PlatformSanityChecks.csproj
index 86d762a5bc..9660d2a90d 100644
--- a/samples/PlatformSanityChecks/PlatformSanityChecks.csproj
+++ b/samples/PlatformSanityChecks/PlatformSanityChecks.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp3.1
+ net6.0
diff --git a/samples/Previewer/Previewer.csproj b/samples/Previewer/Previewer.csproj
index cfedb7ad9e..c1d14cba26 100644
--- a/samples/Previewer/Previewer.csproj
+++ b/samples/Previewer/Previewer.csproj
@@ -1,7 +1,7 @@
Exe
- netcoreapp3.1
+ net6.0
diff --git a/samples/RemoteDemo/RemoteDemo.csproj b/samples/RemoteDemo/RemoteDemo.csproj
index 530cad805f..607222c2e2 100644
--- a/samples/RemoteDemo/RemoteDemo.csproj
+++ b/samples/RemoteDemo/RemoteDemo.csproj
@@ -1,7 +1,7 @@
Exe
- netcoreapp3.1
+ net6.0
diff --git a/samples/RenderDemo/RenderDemo.csproj b/samples/RenderDemo/RenderDemo.csproj
index 0d33b4c111..eed6fa9e89 100644
--- a/samples/RenderDemo/RenderDemo.csproj
+++ b/samples/RenderDemo/RenderDemo.csproj
@@ -1,7 +1,7 @@
Exe
- netcoreapp3.1
+ net6.0
diff --git a/samples/Sandbox/Sandbox.csproj b/samples/Sandbox/Sandbox.csproj
index 0c19440a1e..8f2812e048 100644
--- a/samples/Sandbox/Sandbox.csproj
+++ b/samples/Sandbox/Sandbox.csproj
@@ -2,7 +2,7 @@
WinExe
- netcoreapp3.1
+ net6.0
true
diff --git a/samples/VirtualizationDemo/VirtualizationDemo.csproj b/samples/VirtualizationDemo/VirtualizationDemo.csproj
index d898b737a9..2c6ff74e5e 100644
--- a/samples/VirtualizationDemo/VirtualizationDemo.csproj
+++ b/samples/VirtualizationDemo/VirtualizationDemo.csproj
@@ -1,7 +1,7 @@
Exe
- netcoreapp3.1
+ net6.0
diff --git a/src/Avalonia.Animation/Animation.cs b/src/Avalonia.Animation/Animation.cs
index 172782c5a9..a4515db514 100644
--- a/src/Avalonia.Animation/Animation.cs
+++ b/src/Avalonia.Animation/Animation.cs
@@ -353,6 +353,12 @@ namespace Avalonia.Animation
return new CompositeDisposable(subscriptions);
}
+ ///
+ public Task RunAsync(Animatable control, IClock clock = null)
+ {
+ return RunAsync(control, clock, default);
+ }
+
///
public Task RunAsync(Animatable control, IClock clock = null, CancellationToken cancellationToken = default)
{
diff --git a/src/Avalonia.Animation/Animators/Animator`1.cs b/src/Avalonia.Animation/Animators/Animator`1.cs
index d784227620..23afa76bf6 100644
--- a/src/Avalonia.Animation/Animators/Animator`1.cs
+++ b/src/Avalonia.Animation/Animators/Animator`1.cs
@@ -79,15 +79,15 @@ namespace Avalonia.Animation.Animators
T oldValue, newValue;
- if (firstKeyframe.isNeutral)
- oldValue = neutralValue;
+ if (!firstKeyframe.isNeutral && firstKeyframe.Value is T firstKeyframeValue)
+ oldValue = firstKeyframeValue;
else
- oldValue = (T)firstKeyframe.Value;
+ oldValue = neutralValue;
- if (lastKeyframe.isNeutral)
- newValue = neutralValue;
+ if (!lastKeyframe.isNeutral && lastKeyframe.Value is T lastKeyframeValue)
+ newValue = lastKeyframeValue;
else
- newValue = (T)lastKeyframe.Value;
+ newValue = neutralValue;
if (lastKeyframe.KeySpline != null)
progress = lastKeyframe.KeySpline.GetSplineProgress(progress);
diff --git a/src/Avalonia.Animation/ApiCompatBaseline.txt b/src/Avalonia.Animation/ApiCompatBaseline.txt
index 58cb7830e7..973698f872 100644
--- a/src/Avalonia.Animation/ApiCompatBaseline.txt
+++ b/src/Avalonia.Animation/ApiCompatBaseline.txt
@@ -1,6 +1,5 @@
Compat issues with assembly Avalonia.Animation:
-MembersMustExist : Member 'public System.Threading.Tasks.Task Avalonia.Animation.Animation.RunAsync(Avalonia.Animation.Animatable, Avalonia.Animation.IClock)' does not exist in the implementation but it does exist in the contract.
InterfacesShouldHaveSameMembers : Interface member 'public System.Threading.Tasks.Task Avalonia.Animation.IAnimation.RunAsync(Avalonia.Animation.Animatable, Avalonia.Animation.IClock)' is present in the contract but not in the implementation.
MembersMustExist : Member 'public System.Threading.Tasks.Task Avalonia.Animation.IAnimation.RunAsync(Avalonia.Animation.Animatable, Avalonia.Animation.IClock)' does not exist in the implementation but it does exist in the contract.
InterfacesShouldHaveSameMembers : Interface member 'public System.Threading.Tasks.Task Avalonia.Animation.IAnimation.RunAsync(Avalonia.Animation.Animatable, Avalonia.Animation.IClock, System.Threading.CancellationToken)' is present in the implementation but not in the contract.
-Total Issues: 4
+Total Issues: 3
diff --git a/src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs b/src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs
index 7ff0a8ceca..4a4644317d 100644
--- a/src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs
+++ b/src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs
@@ -140,18 +140,9 @@ namespace Avalonia.Data.Converters
);
}
- Action