Browse Source

Fix GL embed window offset in plugins

Closes #68

Signed-off-by: falkTX <falktx@falktx.com>
tags/2021-03-15
falkTX 4 months ago
parent
commit
228c8eb37a
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      libs/juce-current/source/modules/juce_opengl/native/juce_OpenGL_linux_X11.h

+ 10
- 3
libs/juce-current/source/modules/juce_opengl/native/juce_OpenGL_linux_X11.h View File

@@ -110,7 +110,8 @@ public:
auto glBounds = component.getTopLevelComponent()
->getLocalArea (&component, component.getLocalBounds());
glBounds = Desktop::getInstance().getDisplays().logicalToPhysical (glBounds);
if (JUCEApplicationBase::isStandaloneApp())
glBounds = Desktop::getInstance().getDisplays().logicalToPhysical (glBounds);
embeddedWindow = X11Symbols::getInstance()->xCreateWindow (display, windowH,
glBounds.getX(), glBounds.getY(),
@@ -227,8 +228,14 @@ public:
auto physicalBounds = Desktop::getInstance().getDisplays().logicalToPhysical (bounds);
XWindowSystemUtilities::ScopedXLock xLock;
X11Symbols::getInstance()->xMoveResizeWindow (display, embeddedWindow,
physicalBounds.getX(), physicalBounds.getY(),
if (JUCEApplicationBase::isStandaloneApp())
X11Symbols::getInstance()->xMoveResizeWindow (display, embeddedWindow,
physicalBounds.getX(), physicalBounds.getY(),
(unsigned int) jmax (1, physicalBounds.getWidth()),
(unsigned int) jmax (1, physicalBounds.getHeight()));
else
X11Symbols::getInstance()->xResizeWindow (display, embeddedWindow,
(unsigned int) jmax (1, physicalBounds.getWidth()),
(unsigned int) jmax (1, physicalBounds.getHeight()));
}


Loading…
Cancel
Save