#276, #289, disable DPI awareness setting

This commit is contained in:
Kang Yu 2024-03-14 21:45:15 -07:00
parent e458d4c1f4
commit d8c882be3b
4 changed files with 6 additions and 6 deletions

View file

@ -496,7 +496,7 @@ namespace PersistentWindows.Common.WinApiBridge
[DllImport("user32.dll", SetLastError = true)]
public static extern uint GetDpiForWindow(IntPtr hWnd);
public static bool DpiSenstiveCall = true;
public static bool DpiSenstiveCall = false;
[DllImport("user32.dll")]
public static extern bool IsValidDpiAwarenessContext(int dpi_awareness_cxt);
[DllImport("user32.dll")]

View file

@ -4,9 +4,9 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
<!--<add key="DpiAwareness" value="PerMonitorV2" />-->
</System.Windows.Forms.ApplicationConfigurationSection>
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
<!--<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />-->
</appSettings>
</configuration>

View file

@ -151,8 +151,8 @@ namespace PersistentWindows.SystrayShell
case "-delay_auto_capture":
delay_auto_capture = 1;
break;
case "-dpi_sensitive_call=0":
User32.DpiSenstiveCall = false;
case "-dpi_sensitive_call=1":
User32.DpiSenstiveCall = true;
break;
case "-reject_scale_factor_change=0":
pwp.rejectScaleFactorChange = false;

View file

@ -53,7 +53,7 @@
Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<!--dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>-->
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
<!--<gdiScaling xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings">true</gdiScaling>-->
</windowsSettings>