Browse Source

Couple of minor windowing fixes.

tags/2021-05-28
jules 14 years ago
parent
commit
c1ab947a53
3 changed files with 10 additions and 8 deletions
  1. +9
    -4
      modules/juce_gui_basics/components/juce_Component.cpp
  2. +0
    -3
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp
  3. +1
    -1
      modules/juce_opengl/opengl/juce_OpenGLComponent.cpp

+ 9
- 4
modules/juce_gui_basics/components/juce_Component.cpp View File

@@ -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<Component> 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();


+ 0
- 3
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -1153,9 +1153,6 @@ private:
const float alpha = component->getAlpha();
if (alpha < 1.0f)
setAlpha (alpha);
if (component->isAlwaysOnTop())
setAlwaysOnTop (true);
}
else
{


+ 1
- 1
modules/juce_opengl/opengl/juce_OpenGLComponent.cpp View File

@@ -454,7 +454,7 @@ void OpenGLComponent::updateContext()
if (context != nullptr)
{
#if JUCE_LINUX
if (! useThread)
if (! isUsingDedicatedThread())
#endif
updateContextPosition();


Loading…
Cancel
Save