tuarua / WebViewANE

WebView Adobe Air Native Extension for macOS 10.10+, Windows Desktop, iOS 9.0+ and Android 19+. This ANE provides access to a more modern webview from AIR.
Apache License 2.0
183 stars 53 forks source link

window resizes on init? #143

Closed jasonJamEther closed 6 years ago

jasonJamEther commented 6 years ago

ANE verison 1.6.0

I have a weird issue that keeps coming back and I am not sure what I am doing wrong. When I load a webview for the first time (init), my application stage/window resizes or shrinks. The width and height still trace out the same but there is an obvious jump in the window getting smaller. I am hoping you have seen this before and know right what I am doing wrong. I am really liking this ane.

tuarua commented 6 years ago

Please provide a reproducible example. What is the resolution of your monitor, eg are you running Windows on a retina mac

jasonJamEther commented 6 years ago

webViewTest.zip I have attached a very simply Adobe Animate project as well as a video showing my results. I am running it from a Windows 10 surface pro 3. 2160x1440 resolution.

tuarua commented 6 years ago

As you are using a hiDPI display. try adding to your app xml

...
<requestedDisplayResolution>high</requestedDisplayResolution>
...
</initialWindow>

Pass true for useHiDPI param

webView.init(WebViewANESample.target.stage, viewPort, "https://www.youtube.com", null, 1.0, 0xFFFFFFFF, true);

jasonJamEther commented 6 years ago

adding the \<requestedDisplayResolution> in the xml solved the issue. Thank you.