diff --git a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs index d0c1ec5..97ac603 100644 --- a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs +++ b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs @@ -85,6 +85,7 @@ namespace PersistentWindows.Common private HashSet fullScreenGamingWindows = new HashSet(); 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; diff --git a/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs b/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs index e8b4a78..2950e9e 100644 --- a/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs +++ b/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs @@ -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;