1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fix for component notifications when peer is changing. Some fixes for GCC4.7 on linux.

This commit is contained in:
jules 2012-04-12 10:10:42 +01:00
parent a4b83d313c
commit ab33b1a05d
5 changed files with 16 additions and 2 deletions

View file

@ -110,7 +110,7 @@ public:
void setToggleState (bool shouldBeOn,
bool sendChangeNotification);
/** Returns true if the button in 'on'.
/** Returns true if the button is 'on'.
By default buttons are 'off' and for simple buttons that you click to perform
an action you won't change this. Toggle buttons, however will want to

View file

@ -568,12 +568,20 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo)
if (peer != nullptr)
{
ScopedPointer<ComponentPeer> oldPeerToDelete (peer);
wasFullscreen = peer->isFullScreen();
wasMinimised = peer->isMinimised();
currentConstainer = peer->getConstrainer();
oldNonFullScreenBounds = peer->getNonFullScreenBounds();
removeFromDesktop();
flags.hasHeavyweightPeerFlag = false;
Desktop::getInstance().removeDesktopComponent (this);
internalHierarchyChanged(); // give comps a chance to react to the peer change before the old peer is deleted.
if (safePointer == nullptr)
return;
setTopLeftPosition (topLeft);
}

View file

@ -97,6 +97,7 @@
#include <X11/Xmd.h>
#include <X11/keysym.h>
#include <X11/cursorfont.h>
#include <unistd.h>
#if JUCE_USE_XINERAMA
/* If you're trying to use Xinerama, you'll need to install the "libxinerama-dev" package.. */