Browser contents offset depending on where on the monitor the website is loaded #3353
Replies: 5 comments
-
Do both monitors have the same |
Beta Was this translation helpful? Give feedback.
-
Transitioning to new Discussions section. |
Beta Was this translation helpful? Give feedback.
-
Some reason I cannot seem to convert this into a discussion, will check back later and convert when able. Will be transitioning general questions to |
Beta Was this translation helpful? Give feedback.
-
Windows display settings shows the same resolution (3840 x 2160) for each monitor and the same value for "Change the size of text, apps, and other items" (200%). However, the monitors themselves are physically different sizes. I did a lot of digging on dpi awareness for my application and found that calling private enum PROCESS_DPI_AWARENESS
{
Process_DPI_Unaware = 0,
Process_System_DPI_Aware = 1,
Process_Per_Monitor_DPI_Aware = 2
}
[DllImport("SHCore.dll", SetLastError = true)]
private static extern bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness); Thanks for the help! |
Beta Was this translation helpful? Give feedback.
-
You can disable GPU compositing as per https://github.com/cefsharp/CefSharp/wiki/General-Usage#high-dpi-additional-info if making your application DPI aware is problematic.
.Net 4.7 has a lot of improvements in relation to control sizing/placement, see |
Beta Was this translation helpful? Give feedback.
-
CefSharp.WinForms v73.1.130
WPF/WinForms/OffScreen
?WinForms
No
I have a bit of an odd issue, just wondering if anyone's seen something like this before. It seems that on one monitor on my computer (just one - not both) the browser contents will be offset depending on where the application is located (or - maybe more applicable - where the CefSharp control is located) on the monitor. The mouse location still seems to trigger the same controls as if the contents were not offset.
Here's a screen recording: https://youtu.be/oo1UTtblhUs
A couple quick notes on my application:
Dock.Fill
inside the "Player" tabChromiumWebBrowser.Load("https://www.youtube.com/embed/Y_4i2Oc2zAs");
for testing this issueIt seems to depend on where the browser is "shown". If I click the "Player" tab to show the browser control on the right monitor, then move it to the left monitor, then click the button the content offset can also be seen on the left monitor.
I'm aware I'm on an old version of CefSharp - just wondering if this is some sort of known issue or if things are just super weird on my computer
Beta Was this translation helpful? Give feedback.
All reactions