diff --git a/Avalonia.sln b/Avalonia.sln index e006cadb5a..3ed931933a 100644 --- a/Avalonia.sln +++ b/Avalonia.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27130.2027 MinimumVisualStudioVersion = 10.0.40219.1 @@ -193,6 +193,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Build.Tasks", "src EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "nukebuild\_build.csproj", "{3F00BC43-5095-477F-93D8-E65B08179A00}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Animation.UnitTests", "tests\Avalonia.Animation.UnitTests\Avalonia.Animation.UnitTests.csproj", "{AF227847-E65C-4BE9-BCE9-B551357788E0}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution src\Shared\RenderHelpers\RenderHelpers.projitems*{3c4c0cb4-0c0f-4450-a37b-148c84ff905f}*SharedItemsImports = 13 @@ -1720,6 +1722,30 @@ Global {BF28998D-072C-439A-AFBB-2FE5021241E0}.Release|iPhone.Build.0 = Release|Any CPU {BF28998D-072C-439A-AFBB-2FE5021241E0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {BF28998D-072C-439A-AFBB-2FE5021241E0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.AppStore|iPhone.Build.0 = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Debug|iPhone.Build.0 = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Release|Any CPU.Build.0 = Release|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Release|iPhone.ActiveCfg = Release|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Release|iPhone.Build.0 = Release|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {AF227847-E65C-4BE9-BCE9-B551357788E0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1773,6 +1799,7 @@ Global {E1240B49-7B4B-4371-A00E-068778C5CF0B} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} {D49233F8-F29C-47DD-9975-C4C9E4502720} = {E870DCD7-F46A-498D-83FC-D0FD13E0A11C} {3C471044-3640-45E3-B1B2-16D2FF8399EE} = {E870DCD7-F46A-498D-83FC-D0FD13E0A11C} + {AF227847-E65C-4BE9-BCE9-B551357788E0} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {87366D66-1391-4D90-8999-95A620AD786A} diff --git a/native/Avalonia.Native/src/OSX/window.mm b/native/Avalonia.Native/src/OSX/window.mm index ae00bde780..ef5dcb5b2e 100644 --- a/native/Avalonia.Native/src/OSX/window.mm +++ b/native/Avalonia.Native/src/OSX/window.mm @@ -425,7 +425,7 @@ private: [[Window parentWindow] removeChildWindow:Window]; WindowBaseImpl::Show(); - return SetWindowState(_lastWindowState); + return SetWindowState(Normal); } } @@ -1184,6 +1184,25 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent } } +- (void)windowDidMiniaturize:(NSNotification *)notification +{ + auto parent = dynamic_cast(_parent.operator->()); + + if(parent != nullptr) + { + parent->WindowStateChanged(); + } +} + +- (void)windowDidDeminiaturize:(NSNotification *)notification +{ + auto parent = dynamic_cast(_parent.operator->()); + + if(parent != nullptr) + { + parent->WindowStateChanged(); + } +} - (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame { diff --git a/nukebuild/Build.cs b/nukebuild/Build.cs index 1e1becb1c4..a14842cfd3 100644 --- a/nukebuild/Build.cs +++ b/nukebuild/Build.cs @@ -124,6 +124,7 @@ partial class Build : NukeBuild .DependsOn(Compile) .Executes(() => { + RunCoreTest("./tests/Avalonia.Animation.UnitTests", false); RunCoreTest("./tests/Avalonia.Base.UnitTests", false); RunCoreTest("./tests/Avalonia.Controls.UnitTests", false); RunCoreTest("./tests/Avalonia.Input.UnitTests", false); diff --git a/parameters.cake b/parameters.cake deleted file mode 100644 index 4ef7e8e05a..0000000000 --- a/parameters.cake +++ /dev/null @@ -1,129 +0,0 @@ -using System.Xml.Linq; -using System.Linq; - -public class Parameters -{ - public string Configuration { get; private set; } - public bool SkipTests { get; private set; } - public string MainRepo { get; private set; } - public string MasterBranch { get; private set; } - public string ReleasePlatform { get; private set; } - public string ReleaseConfiguration { get; private set; } - public string ReleaseBranchPrefix { get; private set; } - public string MSBuildSolution { get; private set; } - public bool IsLocalBuild { get; private set; } - public bool IsRunningOnUnix { get; private set; } - public bool IsRunningOnWindows { get; private set; } - public bool IsRunningOnAppVeyor { get; private set; } - public bool IsRunningOnAzure { get; private set; } - public bool IsPullRequest { get; private set; } - public bool IsMainRepo { get; private set; } - public bool IsMasterBranch { get; private set; } - public bool IsReleaseBranch { get; private set; } - public bool IsTagged { get; private set; } - public bool IsReleasable { get; private set; } - public bool IsMyGetRelease { get; private set; } - public bool IsNuGetRelease { get; private set; } - public bool PublishTestResults { get; private set; } - public string Version { get; private set; } - public DirectoryPath ArtifactsDir { get; private set; } - public DirectoryPath NugetRoot { get; private set; } - public DirectoryPath ZipRoot { get; private set; } - public DirectoryPath BinRoot { get; private set; } - public DirectoryPath TestResultsRoot { get; private set; } - public string DirSuffix { get; private set; } - public DirectoryPathCollection BuildDirs { get; private set; } - public string FileZipSuffix { get; private set; } - public FilePath ZipCoreArtifacts { get; private set; } - public FilePath ZipNuGetArtifacts { get; private set; } - public DirectoryPath ZipSourceControlCatalogDesktopDirs { get; private set; } - public FilePath ZipTargetControlCatalogDesktopDirs { get; private set; } - - public Parameters(ICakeContext context) - { - var buildSystem = context.BuildSystem(); - - // ARGUMENTS - Configuration = context.Argument("configuration", "Release"); - SkipTests = context.HasArgument("skip-tests"); - - // CONFIGURATION - MainRepo = "https://github.com/AvaloniaUI/Avalonia"; - MasterBranch = "master"; - ReleaseBranchPrefix = "refs/heads/release/"; - ReleaseConfiguration = "Release"; - MSBuildSolution = "./dirs.proj"; - - // PARAMETERS - IsLocalBuild = buildSystem.IsLocalBuild; - IsRunningOnUnix = context.IsRunningOnUnix(); - IsRunningOnWindows = context.IsRunningOnWindows(); - IsRunningOnAppVeyor = buildSystem.AppVeyor.IsRunningOnAppVeyor; - IsRunningOnAzure = buildSystem.IsRunningOnVSTS || buildSystem.IsRunningOnTFS || context.EnvironmentVariable("LOGNAME") == "vsts"; - - IsPullRequest = buildSystem.AppVeyor.Environment.PullRequest.IsPullRequest; - IsMainRepo = StringComparer.OrdinalIgnoreCase.Equals(MainRepo, context.EnvironmentVariable("BUILD_REPOSITORY_URI")); - IsMasterBranch = StringComparer.OrdinalIgnoreCase.Equals(MasterBranch, context.EnvironmentVariable("BUILD_SOURCEBRANCHNAME")); - IsReleaseBranch = (context.EnvironmentVariable("BUILD_SOURCEBRANCH")??"").StartsWith(ReleaseBranchPrefix, StringComparison.OrdinalIgnoreCase); - IsTagged = buildSystem.AppVeyor.Environment.Repository.Tag.IsTag - && !string.IsNullOrWhiteSpace(buildSystem.AppVeyor.Environment.Repository.Tag.Name); - IsReleasable = StringComparer.OrdinalIgnoreCase.Equals(ReleaseConfiguration, Configuration); - IsMyGetRelease = !IsTagged && IsReleasable; - IsNuGetRelease = IsMainRepo && IsReleasable && IsReleaseBranch; - - // VERSION - Version = context.Argument("force-nuget-version", GetVersion()); - - if (IsRunningOnAppVeyor) - { - string tagVersion = null; - if (IsTagged) - { - var tag = buildSystem.AppVeyor.Environment.Repository.Tag.Name; - var nugetReleasePrefix = "nuget-release-"; - IsNuGetRelease = IsTagged && IsReleasable && tag.StartsWith(nugetReleasePrefix); - if(IsNuGetRelease) - tagVersion = tag.Substring(nugetReleasePrefix.Length); - } - if(tagVersion != null) - { - Version = tagVersion; - } - else - { - // Use AssemblyVersion with Build as version - Version += "-build" + context.EnvironmentVariable("APPVEYOR_BUILD_NUMBER") + "-beta"; - } - } - else if (IsRunningOnAzure) - { - if(!IsNuGetRelease) - { - // Use AssemblyVersion with Build as version - Version += "-build" + context.EnvironmentVariable("BUILD_BUILDID") + "-beta"; - } - - PublishTestResults = true; - } - - // DIRECTORIES - ArtifactsDir = (DirectoryPath)context.Directory("./artifacts"); - NugetRoot = ArtifactsDir.Combine("nuget"); - ZipRoot = ArtifactsDir.Combine("zip"); - BinRoot = ArtifactsDir.Combine("bin"); - TestResultsRoot = ArtifactsDir.Combine("test-results"); - BuildDirs = context.GetDirectories("**/bin") + context.GetDirectories("**/obj"); - DirSuffix = Configuration; - FileZipSuffix = Version + ".zip"; - ZipCoreArtifacts = ZipRoot.CombineWithFilePath("Avalonia-" + FileZipSuffix); - ZipNuGetArtifacts = ZipRoot.CombineWithFilePath("Avalonia-NuGet-" + FileZipSuffix); - ZipSourceControlCatalogDesktopDirs = (DirectoryPath)context.Directory("./samples/ControlCatalog.Desktop/bin/" + DirSuffix + "/net461"); - ZipTargetControlCatalogDesktopDirs = ZipRoot.CombineWithFilePath("ControlCatalog.Desktop-" + FileZipSuffix); - } - - private static string GetVersion() - { - var xdoc = XDocument.Load("./build/SharedVersion.props"); - return xdoc.Descendants().First(x => x.Name.LocalName == "Version").Value; - } -} diff --git a/samples/RenderDemo/Pages/AnimationsPage.xaml b/samples/RenderDemo/Pages/AnimationsPage.xaml index 1646708797..b5a8ff6dea 100644 --- a/samples/RenderDemo/Pages/AnimationsPage.xaml +++ b/samples/RenderDemo/Pages/AnimationsPage.xaml @@ -43,7 +43,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> + @@ -120,6 +150,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> + diff --git a/samples/RenderDemo/Pages/ClippingPage.xaml b/samples/RenderDemo/Pages/ClippingPage.xaml index 2bdecfc0ef..ca1b297363 100644 --- a/samples/RenderDemo/Pages/ClippingPage.xaml +++ b/samples/RenderDemo/Pages/ClippingPage.xaml @@ -8,7 +8,7 @@ xmlns="https://github.com/avaloniaui">