diff --git a/CHANGELOG.md b/CHANGELOG.md index 429880a6..fb1a629a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Versioning](https://semver.org/spec/v2.0.0.html). ### Fixed +- Fixed DPI scaling causing windows contents to become larger than they should + be when using **Wine 9.17+** and Wine's font DPI scaling feature. - Fixed a potential segfault when unloading yabridge. ## [5.1.0] - 2023-12-23 diff --git a/src/wine-host/host.cpp b/src/wine-host/host.cpp index 7eece1d7..072c0033 100644 --- a/src/wine-host/host.cpp +++ b/src/wine-host/host.cpp @@ -88,6 +88,12 @@ int YABRIDGE_EXPORT std::cerr << "Initializing " << host_name << std::endl; + // NOTE: Without this, Wine 9.17+ will try to scale surface bitmaps in the + // X11 driver, which results in window client areas being larger than + // should be. + // https://github.com/robbert-vdh/yabridge/issues/368 + SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE); + // NOTE: Some plugins use Microsoft COM, but don't initialize it first and // just pray the host does it for them. Examples of this are // PSPaudioware's InfiniStrip and Shattered Glass Audio Code Red Free.