Browse Source

WebBrowserComponent: Windows: Trigger resized event on DPI change when using WebView2

This fixes a bug where moving a window between displays with different
scaling settings makes the embedded WebView misaligned.
develop
attila 2 years ago
parent
commit
06855ed05d
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp

+ 6
- 0
modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp View File

@@ -987,6 +987,12 @@ private:
inline static WebView2ConstructionHelper webView2ConstructionHelper;
NativeScaleFactorNotifier scaleFactorNotifier { this,
[this] (auto)
{
componentMovedOrResized (true, true);
} };
//==============================================================================
JUCE_DECLARE_WEAK_REFERENCEABLE (WebView2)
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebView2)


Loading…
Cancel
Save