From 159c1f46c1511e7ad708dae94ae264c2b072527f Mon Sep 17 00:00:00 2001 From: Pius Friesch Date: Wed, 15 Dec 2021 17:58:38 +0100 Subject: [PATCH] add support for images in clipboards on macos --- ElectronNET.API/App.cs | 6 +++++- ElectronNET.WebApp/ElectronNET.WebApp.csproj | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ElectronNET.API/App.cs b/ElectronNET.API/App.cs index 935a6192..a612af60 100644 --- a/ElectronNET.API/App.cs +++ b/ElectronNET.API/App.cs @@ -588,8 +588,12 @@ public string Name public Task GetNameAsync() => BridgeConnector.OnResult("appGetName", "appGetNameCompleted"); - private App() + private App() { + if (OperatingSystem.IsMacOS() || OperatingSystem.IsLinux()) + { + AppContext.SetSwitch("System.Drawing.EnableUnixSupport", true); + } CommandLine = CommandLine.Instance; } diff --git a/ElectronNET.WebApp/ElectronNET.WebApp.csproj b/ElectronNET.WebApp/ElectronNET.WebApp.csproj index add73e84..a2a7e6b1 100644 --- a/ElectronNET.WebApp/ElectronNET.WebApp.csproj +++ b/ElectronNET.WebApp/ElectronNET.WebApp.csproj @@ -16,6 +16,7 @@ +