diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index 271ba8379c..85c05a9f0b 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -69,7 +69,7 @@ public: } } - static void sendMouseEvent (Component& comp, BailOutChecker& checker, + static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker, void (MouseListener::*eventMethod) (const MouseEvent&), const MouseEvent& e) { if (checker.shouldBailOut()) @@ -117,7 +117,7 @@ public: } } - static void sendWheelEvent (Component& comp, BailOutChecker& checker, const MouseEvent& e, + static void sendWheelEvent (Component& comp, Component::BailOutChecker& checker, const MouseEvent& e, const float wheelIncrementX, const float wheelIncrementY) { { @@ -169,7 +169,7 @@ private: class BailOutChecker2 { public: - BailOutChecker2 (BailOutChecker& checker_, Component* const component) + BailOutChecker2 (Component::BailOutChecker& checker_, Component* const component) : checker (checker_), safePointer (component) { } @@ -180,7 +180,7 @@ private: } private: - BailOutChecker& checker; + Component::BailOutChecker& checker; const WeakReference safePointer; JUCE_DECLARE_NON_COPYABLE (BailOutChecker2); @@ -693,6 +693,11 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo) if (wasMinimised) peer->setMinimised (true); + #if JUCE_WINDOWS + if (isAlwaysOnTop()) + peer->setAlwaysOnTop (true); + #endif + peer->setConstrainer (currentConstainer); repaint(); diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index a01ce6eb87..64c5feb3cf 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -1153,9 +1153,6 @@ private: const float alpha = component->getAlpha(); if (alpha < 1.0f) setAlpha (alpha); - - if (component->isAlwaysOnTop()) - setAlwaysOnTop (true); } else { diff --git a/modules/juce_opengl/opengl/juce_OpenGLComponent.cpp b/modules/juce_opengl/opengl/juce_OpenGLComponent.cpp index 97300390ae..0ca3074da5 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLComponent.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLComponent.cpp @@ -454,7 +454,7 @@ void OpenGLComponent::updateContext() if (context != nullptr) { #if JUCE_LINUX - if (! useThread) + if (! isUsingDedicatedThread()) #endif updateContextPosition();