Browse Source

Windowing: Ignore suggested window sizes for windows that should not be DPI aware

v6.1.6
reuk 3 years ago
parent
commit
8b45ff83e2
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp

+ 6
- 0
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -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))


Loading…
Cancel
Save