Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinForms HiDpi Displayed Incorrectly #1803

Closed
pieterdhondt opened this issue Sep 19, 2016 · 12 comments
Closed

WinForms HiDpi Displayed Incorrectly #1803

pieterdhondt opened this issue Sep 19, 2016 · 12 comments

Comments

@pieterdhondt
Copy link

When running the minimal WinForms project I have this issue:

cefsharpissue

Only disabling the gpu settings.CefCommandLineArgs.Add("disable-gpu", "1"); helps, but I can't do this because there is WebGl content that I want to display.

Interesting to note is that in version 43.0.0 this displays correctly.

  • What version of the product are you using?
    • Every version above 43.0.1
  • What architecture x86 or x64? x64
  • On what operating system?
    • Win10
  • System Information
    • Dell Precision 5510, nVidia Quadro M1000M driver version 369.09, Win10, hi-res display 3840x2160
  • Are you using WinForms, WPF or OffScreen? WinForms (WPF works, but my application is WinForms)
  • What steps will reproduce the problem?
    • Using the [MinimalExample] and the WinForms project.
  • Does this problem also occur in the Cef TestApp from http://opensource.spotify.com/cefbuilds/index.html (http://cefbuilds.com for older version)?
    no, there it displays normally
@amaitland
Copy link
Member

Have you tried building master? Have you Searched github for high DPI issues?

https://github.com/cefsharp/CefSharp/blob/cefsharp/53/CefSharp.WinForms.Example/Program.cs#L47
https://github.com/cefsharp/CefSharp/blob/cefsharp/53/CefSharp.WinForms.Example/app.manifest#L39

If that doesn't work you'll have to dissect cefclient to see what it's doing differently.

@amaitland amaitland changed the title WinForms black screen scaling issue WinForms HiDpi Displayed Incorrectly Sep 20, 2016
@amaitland
Copy link
Member

Every version above 43.0.1

If the problem was limited to the latest release then I'd be more inclined to think this was an actual issue. I'm guessing it's likely an environmental/configuration issue at this point.

I've updated the MinimalExample see cefsharp/CefSharp.MinimalExample@21f8a90 I haven't tested this yet, just applied the same changes that were made to the other example.

@pieterdhondt
Copy link
Author

Thanks @amaitland , adding these changes solved the issues I had!

@jsh-ec
Copy link

jsh-ec commented Oct 25, 2016

I have the same issue. Build and run a minimal example with Display Settings scaling on Windows 10 set to 100%, all works fine. Change the scaling to 150% and the display portion of the browser does not fill the window and the remaining area is set to black. Disable-gpu and all works fine????

@twofishsoftware
Copy link

I can confirm that @amaitland 's suggestion work for me. Seems the relevant change is:

//For Windows 7 and above, best to include relevant app.manifest entries as well
Cef.EnableHighDPISupport();

//Perform dependency check to make sure all relevant resources are in our output directory.
Cef.Initialize(new CefSettings(), shutdownOnProcessExit:false, performDependencyCheck:true);

@Et3rnal
Copy link

Et3rnal commented Dec 4, 2017

This issue exists on AnyCPU and applying these configurations doesn't solve it

The only work around I found so far is disabling the gpu
settings.CefCommandLineArgs.Add("disable-gpu", "1");

Any hints??

@didimitrie
Copy link

The only work around I found so far is disabling the gpu
settings.CefCommandLineArgs.Add("disable-gpu", "1");

Thanks for this, was having similar issues. Still not really sure how to make it work (i'm actually using cef pure).

@danielehrhardt
Copy link

Did someone fixed it?

@amaitland
Copy link
Member

@amaitland
Copy link
Member

@davidei1955

This comment was marked as outdated.

@amaitland
Copy link
Member

amaitland commented Jun 25, 2024

This issue is very old and the information contained within is largely out of date.

Refer to #4410 instead.

There's some additional information in #2927 that may also be useful.

@cefsharp cefsharp locked as resolved and limited conversation to collaborators Jun 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants