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())); }