|
|
@@ -3370,6 +3370,12 @@ private: |
|
|
|
|
|
|
|
LRESULT handleDPIChanging (int newDPI, RECT newRect)
|
|
|
|
{
|
|
|
|
// Sometimes, windows that should not be automatically scaled (secondary windows in plugins)
|
|
|
|
// are sent WM_DPICHANGED. The size suggested by the OS is incorrect for our unscaled
|
|
|
|
// window, so we should ignore it.
|
|
|
|
if (! isPerMonitorDPIAwareWindow (hwnd))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
const auto newScale = (double) newDPI / USER_DEFAULT_SCREEN_DPI;
|
|
|
|
|
|
|
|
if (approximatelyEqual (scaleFactor, newScale))
|
|
|
|