Merge pull request #5 from theolivenbaum/clipboard-image-support-macos

add support for images in clipboards on macos
This commit is contained in:
theolivenbaum
2021-12-15 18:31:49 +01:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -588,8 +588,12 @@ namespace ElectronNET.API
public Task<string> GetNameAsync() => BridgeConnector.OnResult<string>("appGetName", "appGetNameCompleted");
private App()
private App()
{
if (OperatingSystem.IsMacOS() || OperatingSystem.IsLinux())
{
AppContext.SetSwitch("System.Drawing.EnableUnixSupport", true);
}
CommandLine = CommandLine.Instance;
}

View File

@@ -16,6 +16,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="6.0.5.128" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ElectronNET.API\ElectronNET.API.csproj" />