add option -reject_scale_factor_change=0

This commit is contained in:
Kang Yu 2024-03-04 21:45:12 -08:00
parent c5763a4f98
commit e458d4c1f4
2 changed files with 7 additions and 0 deletions

View file

@ -85,6 +85,7 @@ namespace PersistentWindows.Common
private HashSet<IntPtr> fullScreenGamingWindows = new HashSet<IntPtr>();
private POINT initCursorPos;
private bool freezeCapture = false;
public bool rejectScaleFactorChange = true;
// restore control
private Timer restoreTimer;
@ -2403,6 +2404,9 @@ namespace PersistentWindows.Common
// detect scale factor change back to 100% from 125%, 150%, 175%, 200%, 225%, 250% etc in User32.GetWindowRect()
private bool IsScaleFactorChanged(int x, int y, int nx, int ny)
{
if (!rejectScaleFactorChange)
return false;
if (nx <= x || ny <= y)
return false;

View file

@ -154,6 +154,9 @@ namespace PersistentWindows.SystrayShell
case "-dpi_sensitive_call=0":
User32.DpiSenstiveCall = false;
break;
case "-reject_scale_factor_change=0":
pwp.rejectScaleFactorChange = false;
break;
case "-redirect_appdata":
redirect_appdata = true;
break;