mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-25 02:04:23 +00:00
Fixed an issue where resizing a VST2 plug-in on a HiDPI monitor on linux would recursively decrease the editor size
This commit is contained in:
parent
53ae78f1bb
commit
f85bbb2a61
1 changed files with 5 additions and 1 deletions
|
|
@ -1344,7 +1344,11 @@ public:
|
|||
#if ! JUCE_LINUX // setSize() on linux causes renoise and energyxt to fail.
|
||||
setSize (cw, ch);
|
||||
#else
|
||||
XResizeWindow (display, (Window) getWindowHandle(), (unsigned int) cw, (unsigned int) ch);
|
||||
const double scale = Desktop::getInstance().getDisplays().getDisplayContaining (getScreenBounds().getCentre()).scale;
|
||||
Rectangle<int> childBounds (child->getWidth(), child->getHeight());
|
||||
childBounds *= scale;
|
||||
|
||||
XResizeWindow (display, (Window) getWindowHandle(), childBounds.getWidth(), childBounds.getHeight());
|
||||
#endif
|
||||
|
||||
#if JUCE_MAC
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue