From dbf89fce765132c54a1750527edf365e397417db Mon Sep 17 00:00:00 2001 From: hogliux Date: Fri, 5 May 2017 11:19:26 +0100 Subject: [PATCH] Fixed an issue where the Projucer's login window would remain blank on Ubuntu linux (Fixes #201) --- .../native/juce_linux_XEmbedComponent.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp b/modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp index e8debcfeae..62ffb403ea 100644 --- a/modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp +++ b/modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp @@ -154,8 +154,6 @@ public: private: //============================================================================== - friend class Ref; - SharedKeyWindow (ComponentPeer* peerToUse) : keyPeer (peerToUse), keyProxy (juce_createKeyProxyWindow (keyPeer)), @@ -366,10 +364,17 @@ private: XMoveResizeWindow (dpy, host, newBounds.getX(), newBounds.getY(), static_cast (newBounds.getWidth()), static_cast (newBounds.getHeight())); + } + } - if (client != 0 && (currentBounds.getWidth() != newBounds.getWidth() - || currentBounds.getHeight() != newBounds.getHeight())) - XResizeWindow (dpy, client, + if (client != 0 && XGetWindowAttributes (dpy, client, &attr)) + { + Rectangle currentBounds (attr.x, attr.y, attr.width, attr.height); + + if ((currentBounds.getWidth() != newBounds.getWidth() + || currentBounds.getHeight() != newBounds.getHeight())) + { + XMoveResizeWindow (dpy, client, 0, 0, static_cast (newBounds.getWidth()), static_cast (newBounds.getHeight())); }