Skip to content

Commit

Permalink
Net Core - Remove EnableHighDPISupport from BrowserSubProcess
Browse files Browse the repository at this point in the history
- NetCore has it's own exe which still had a call to EnableHighDPISupport
- WPF seems to default to System DPI aware, revert to using app.manifest for PerMonitorV2

Follow up to b17cd2a

Issues #4417 #4410
  • Loading branch information
amaitland committed Mar 13, 2023
1 parent 8f03007 commit 7bfcaef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 0 additions & 2 deletions CefSharp.BrowserSubprocess/Program.netcore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public static int Main(string[] args)
{
Debug.WriteLine("BrowserSubprocess starting up with command line: " + string.Join("\n", args));

SubProcess.EnableHighDPISupport();

//Add your own custom implementation of IRenderProcessHandler here
IRenderProcessHandler handler = null;

Expand Down
6 changes: 4 additions & 2 deletions CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- Note: We cannot use the recommended style of specifying <Project Sdk=...> because we need
to set BaseIntermediateOutputPath and BaseOutputPath before the SDK props are imported. -->
Expand All @@ -11,7 +11,8 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0-windows</TargetFrameworks>
<TargetFrameworks Condition="'$(VisualStudioVersion)'=='17.0'">$(TargetFrameworks);net6.0-windows</TargetFrameworks>
<RootNamespace>CefSharp.Wpf.Example</RootNamespace>
<AssemblyName>CefSharp.Wpf.Example</AssemblyName>
<UseWPF>true</UseWPF>
Expand Down Expand Up @@ -40,6 +41,7 @@
<ProjectReference Include="..\CefSharp.Wpf\CefSharp.Wpf.netcore.csproj" />
<ProjectReference Include="..\CefSharp\CefSharp.netcore.csproj" />
<PackageReference Include="chromiumembeddedframework.runtime" Version="111.2.2" />
<PackageReference Include="System.Runtime.InteropServices.WindowsRuntime" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 7 additions & 0 deletions CefSharp.Wpf.Example/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
</security>
</trustInfo>

<asmv3:application>
<asmv3:windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of all Windows versions that this application is designed to work with.
Expand Down

0 comments on commit 7bfcaef

Please sign in to comment.