Replies: 2 comments
-
Right now yes, each User Data Folder (which really means each browser process) must have the same DPI and match the app's DPI, or else the HWND wouldn't be able to be parented correctly. We are working on a change that would improve this on newer OS's (Win10+) by leveraging visuals. The only workaround I can think of until that's available is to have separate User Data Folders if that's acceptable to your app (it often isn't, which makes it not a great workaround). @jamesoli any other suggestions here? |
Beta Was this translation helpful? Give feedback.
-
We are now using the workaround with separate UDF for each DPI awareness. Not pretty, but it helps. |
Beta Was this translation helpful? Give feedback.
-
If I start two different applications (exe) sharing the same WebView2 intialization code and the same UDF (user data folder), I get an exception from the second application (during WV2 initialization) when it doesn't run with the same DPI awareness as the first application.
We want our applications to run in SYSTEM_DPI_AWARE mode. So, we defined this in the manifest and verify this at runtime before initializing the WebView2. Most of our applications are running in RDP sessions. We also have realized, that our Exe is not the last instance controlling the DPI awareness mode. Depending on the OS, you could change the DPI behaviour through the properties dialog of the application. For Windows 10, Windows Server 2016 and later, we tell our customers to set the properties accordingly. Then we have no problem.
But on Windows Server 2012 R2 there is no "Advanced DPI settings" button in the properties dialog. Thus, our work around with the proper settings doesn't help. It seems that there are some RDP clients starting our application in DPI_UNAWARE mode. But we have no clue, how to change the DPI behaviour.
If it's true that the UDF is bound to a singular DPI awareness and we can't change the DPI behaviour of the RDP clients running with Windows Server 2012 R2, then the single solution that I see is to have two different UDF (depending on the DPI awareness of the process).
Any advice is highly appreciated! Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions