The Wayback Machine - https://web.archive.org/web/20200911011757/https://github.com/juce-framework/JUCE/pull/722
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

Fix hidpi scaling on Linux #722

Open
wants to merge 2 commits into
base: juce6
from
Open

Conversation

@terencode
Copy link

terencode commented May 14, 2020

@falkTX and I were trying to figure out why a VST (Pianoteq) was not displaying correctly on Carla as well as Reaper or even jalv (https://gitlab.com/drobilla/jalv) on my setup (falkTX/Carla#932) and we found the problem:

I'm on Xorg with gnome-shell and a hidpi screen (2560x1440) so getDisplayScale() from https://github.com/juce-framework/JUCE/blob/juce6/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp#L909 returns 2. JUCE then scales the plugin accordingly but the problem is it's not notifying the host about it.
So, what happened was only 1/4 of a plugin UI would be shown.
I could reproduce this with Pianoteq 6 and CHOW (https://github.com/jatinchowdhury18/CHOW) but it probably impacts all the plugins built with JUCE5/6

Once those commits are applied, the VST2/3 will need to be rebuilt and will in turn correctly work on hidpi (we tested it and confirmed working with CHOW).

falkTX added 2 commits May 9, 2020
Signed-off-by: falkTX <falktx@falktx.com>
Signed-off-by: falkTX <falktx@falktx.com>
@terencode
Copy link
Author

terencode commented May 14, 2020

Some screenshots of the problem:

In Reaper:

image

In Carla:
image

@julienpommier
Copy link

julienpommier commented May 18, 2020

It is quite easy to reproduce with the JUCE AudioPluginDemo VST3, just build it with getDisplayScale returning 2 and load it in the AudioPluginHost.

@ed95
Copy link
Member

ed95 commented May 18, 2020

Thanks for the report! The approach that we took for Windows high DPI scaling in plug-ins was to bypass the normal scaling that happens in the ComponentPeer code for standalone applications and instead let the host control the scale factor of the plug-in. We've added something similar to the Linux code in a8b6066 which should fix the issue that you're seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.