-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add DPI-Aware Manifests for High DPI Support #664
Conversation
add dpi-aware manifest to BrowserSubprocess and WinForms.Example projects update .gitignore to allow .manifest files
What exactly is a dpi-aware manifest? What purposes does it serve for the |
An app.manifest file provides extra information about an application that the compiler integrates into the executable. This file is XML and can be both added to a project with and edited with Visual Studio. Historically, this was most used to inform Windows that an EXE requires elevated permissions (usually requiring a UAC prompt when the EXE is run). More recently, an option was added to the newest app.manifest schema that will inform Windows that your application is 'DPI Aware'. With this flag on, the application will be allowed to draw its own high resolution imagery, instead of being automatically (and poorly) upsampled by Windows to match the current zoom level. See http://stackoverflow.com/questions/13448180/how-do-i-enable-dpiaware This app.manifest is required to be integrated into the executable of every process that supports high DPI. So in the case of CefSharp, this is the WinForms example, but also the BrowserSubprocess exe as well. Without the manifest applied both to the BrowserSubprocess and the consuming app, the browser process will not draw high DPI properly. I have verified this on the main CEF forum: http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=12366 Once this is fully resolved with CefSharp I will respond there with success. |
Appreciate the detailed description 👍 |
I'll have a read over the links you provided. The |
I format *ML that way out of habit for readability. You can feel free to remove the breaks. |
Were you able to get things running locally to confirm this works? |
No, I am still having the issue described in #628 I have my own application where I have followed these steps (including adding the app.manifest to the browserprocess proj) to success, but as stated, cefsharp and its example doesn't work 'out of the box' for me right now and I don't know why. Do you know what might cause the errors it puts in the log file? Particularly: |
I'm not sure, I've personally never seen that problem before. Operating System |
Windows 8.1 64 bit, Visual Studio 2013 Update 4, Solution set to Debug / Win32.. But nevermind all of that, I just ran it again and I guess my computer shook off the dust because it works great now :) Here is a screenshot of the winforms example running in beautiful 200% DPI (probably flippin huge on a normal-DPI display): http://screencast.com/t/C1JbhmJK |
Nice 👍 |
Maybe this would eliminate the need for #619 ? Have you tested this with WPF too? |
@bjarteskogoy I did not alter the WPF aspect since I am not familiar enough with WPF that I know what is required for high DPI support. It may well be the exact same solution. You could try pulling my branch, adding a manifest to the WPF example (right click project, add item..., search for 'app manifest'), and copying the contents from one of the other two app.manifests (the content is the same). @amaitland I am still working off of my own branch until this is integrated. Anything I can do to help merge this pull req? |
@jimnoble I noticed both <assemblyIdentity version="1.0.0.0" name="MyApplication.app" /> Need to update the name for each project and also look at having the |
Add DPI-Aware Manifests for High DPI Support
add dpi-aware manifest to BrowserSubprocess and WinForms.Example
projects
update .gitignore to allow .manifest files