Coder Social home page Coder Social logo

Comments (5)

vslavik avatar vslavik commented on June 30, 2024

It's possible this too is due to your application's configuration — did you try to reproduce in the bundled example?

It's also possible updating the bundled wx library would fix it. If not, a patch would be appreciated — this is a rare case within a rare case (multi-display and different-DPI) and hard to reproduce without the equipment you have.

from winsparkle.

codygray avatar codygray commented on June 30, 2024

This is not a WinSparkle issue, per se. Modern versions of Windows actually support per-monitor DPI, but for compatibility reasons, applications have to specifically indicate that they can handle this. If they do not indicate this, then Windows will try to scale their client areas automatically...which often results in sub-par results. The way you indicate to Windows that your application is per-monitor DPI aware is by adding an entry to your manifest. See: https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows

The manifest will indicate that your application's process supports per-monitor DPI. Assuming that WinSparkle runs in the same process as your application (albeit in a separate thread), it will inherit (and thus be subjected to) whatever settings are in your application's manifest. Chances are, your application's manifest is not indicating that your application is per-monitor DPI aware, so Windows is trying to scale WinSparkle's UI automatically instead of letting WinSparkle handle the scaling itself.

This, of course, assumes that WinSparkle is actually per-monitor DPI aware. If it is not, then this needs to be fixed in WinSparkle. In the ideal case, your application and WinSparkle will agree about their per-monitor DPI awareness, and thus you can just configure the process accordingly. If your application and WinSparkle do not agree about their per-monitor DPI awareness, then all is not lost---at least not with Windows 10 Anniversary Update, where you can actually specify DPI awareness per-thread, which means that WinSparkle's thread can use a different DPI awareness setting from your application's main UI thread. See https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-improvements-for-desktop-applications

Note that no special equipment should be required to reproduce. You need a minimum of two monitors (a laptop plus an external screen will work) and a modern version of Windows. Then, simply set one of the monitors to use a different DPI than the other monitor. And, while this seems like an esoteric configuration, it is actually more common than one would think: consider a notebook like a Microsoft Surface that uses a high-DPI display that has a cheap external display connected to it (which is using low DPI).

from winsparkle.

supersv avatar supersv commented on June 30, 2024

@codygray The app is fully DPI aware (per-monitor V2 on latest versions of Windows, and degrading gracefully). This is a WinSparkle problem (and/or its UI framework).

from winsparkle.

supersv avatar supersv commented on June 30, 2024

P.S. As for testing, Virtual Box with several virtual monitors configured at different DPI is enough. For real-life testing, a Hi-DPI notebook plus a regular (96 DPI) monitor is a pretty common setup.

from winsparkle.

vslavik avatar vslavik commented on June 30, 2024

This is not a WinSparkle issue, per se.

Honestly, I think it is, as mentioned above - updating wxWidgets to a current version is likely to either fix it or considerably help with any remaining work.

at least not with Windows 10 Anniversary Update, where you can actually specify DPI awareness per-thread, which means that WinSparkle's thread can use a different DPI awareness setting from your application's main UI thread. See https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-improvements-for-desktop-applications

Thanks! It's good to know this option is there as the last resort.

from winsparkle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.