Browse Source

Remove juce workaround for crash on close, no longer needed

Signed-off-by: falkTX <falktx@falktx.com>
tags/2021-03-15
falkTX 1 year ago
parent
commit
c557b35cdd
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
6 changed files with 128 additions and 296 deletions
  1. +124
    -134
      libs/juce-current/patches/24_vital-needed-changes_pt3.patch
  2. +0
    -104
      libs/juce-current/patches/25_x11-crash-on-close-workaround.patch
  3. +0
    -3
      libs/juce-current/source/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
  4. +1
    -0
      libs/juce-current/source/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp
  5. +3
    -53
      libs/juce-current/source/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
  6. +0
    -2
      libs/juce-current/source/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h

+ 124
- 134
libs/juce-current/patches/24_vital-needed-changes_pt3.patch View File

@@ -1,8 +1,8 @@
diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp
index 7642040bd..ed02448b8 100644
--- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp
+++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp
@@ -842,6 +842,26 @@ namespace WavFileHelpers
diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp
index 7642040bd..ed02448b8 100644
--- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp
+++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp
@@ -842,6 +842,26 @@ namespace WavFileHelpers
return out.getMemoryBlock();
}
};
@@ -29,7 +29,7 @@ index 7642040bd..ed02448b8 100644
//==============================================================================
namespace AXMLChunk
@@ -1321,6 +1341,7 @@ public:
@@ -1321,6 +1341,7 @@ public:
listInfoChunk = ListInfoChunk::createFrom (metadataValues);
acidChunk = AcidChunk::createFrom (metadataValues);
trckChunk = TracktionChunk::createFrom (metadataValues);
@@ -37,7 +37,7 @@ index 7642040bd..ed02448b8 100644
}
headerPosition = out->getPosition();
@@ -1383,7 +1404,7 @@ public:
@@ -1383,7 +1404,7 @@ public:
}
private:
@@ -46,7 +46,7 @@ index 7642040bd..ed02448b8 100644
uint64 lengthInSamples = 0, bytesWritten = 0;
int64 headerPosition = 0;
bool writeFailed = false;
@@ -1421,6 +1442,7 @@ private:
@@ -1421,6 +1442,7 @@ private:
+ chunkSize (listInfoChunk)
+ chunkSize (acidChunk)
+ chunkSize (trckChunk)
@@ -54,7 +54,7 @@ index 7642040bd..ed02448b8 100644
+ (8 + 28)); // (ds64 chunk)
riffChunkSize += (riffChunkSize & 1);
@@ -1503,6 +1525,7 @@ private:
@@ -1503,6 +1525,7 @@ private:
writeChunk (listInfoChunk, chunkName ("LIST"));
writeChunk (acidChunk, chunkName ("acid"));
writeChunk (trckChunk, chunkName ("Trkn"));
@@ -62,21 +62,11 @@ index 7642040bd..ed02448b8 100644
writeChunkHeader (chunkName ("data"), isRF64 ? -1 : (int) (lengthInSamples * bytesPerFrame));
diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
index 7909098c9..19eb385fd 100644
--- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
+++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
@@ -28,6 +28,9 @@
//==============================================================================
#if JucePlugin_Build_VST3 && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
+#if JUCE_LINUX^M
+ #include <arpa/inet.h>^M
+#endif^M
#if JUCE_PLUGINHOST_VST3
#if JUCE_MAC
@@ -2618,6 +2621,9 @@ public:
diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
index 7909098c9..19eb385fd 100644
--- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
+++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
@@ -2618,6 +2621,9 @@ public:
//==============================================================================
void processParameterChanges (Vst::IParameterChanges& paramChanges)
{
@@ -86,11 +76,11 @@ index 7909098c9..19eb385fd 100644
jassert (pluginInstance != nullptr);
auto numParamsChanged = paramChanges.getParameterCount();
diff --git a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp
index 50cae68ed..549d8edb8 100644
--- a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp
+++ b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp
@@ -393,6 +393,7 @@ public:
diff --git a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp
index 50cae68ed..549d8edb8 100644
--- a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp
+++ b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp
@@ -393,6 +393,7 @@ public:
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
TRANS("Error when trying to open audio device!"),
error);
@@ -98,7 +88,7 @@ index 50cae68ed..549d8edb8 100644
}
bool showDeviceControlPanel()
@@ -1120,6 +1121,8 @@ void AudioDeviceSelectorComponent::updateMidiOutput()
@@ -1120,6 +1121,8 @@ void AudioDeviceSelectorComponent::updateMidiOutput()
deviceManager.setDefaultMidiOutputDevice ({});
else
deviceManager.setDefaultMidiOutputDevice (currentMidiOutputs[selectedId - 1].identifier);
@@ -107,11 +97,11 @@ index 50cae68ed..549d8edb8 100644
}
void AudioDeviceSelectorComponent::changeListenerCallback (ChangeBroadcaster*)
diff --git a/modules/juce_core/native/juce_curl_Network.cpp b/modules/juce_core/native/juce_curl_Network.cpp
index 00d428350..dd3375ff7 100644
--- a/modules/juce_core/native/juce_curl_Network.cpp
+++ b/modules/juce_core/native/juce_curl_Network.cpp
@@ -332,6 +332,9 @@ public:
diff --git a/modules/juce_core/native/juce_curl_Network.cpp b/modules/juce_core/native/juce_curl_Network.cpp
index 00d428350..dd3375ff7 100644
--- a/modules/juce_core/native/juce_curl_Network.cpp
+++ b/modules/juce_core/native/juce_curl_Network.cpp
@@ -332,6 +332,9 @@ public:
// or 3) data is in the in buffer
while ((! finished) && curlBuffer.getSize() == 0)
{
@@ -121,11 +111,11 @@ index 00d428350..dd3375ff7 100644
{
const ScopedLock lock (cleanupLock);
diff --git a/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h b/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h
index 7f64d433d..e9360e0de 100644
--- a/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h
+++ b/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h
@@ -74,6 +74,7 @@ struct SIMDNativeOps<float>
diff --git a/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h b/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h
index 7f64d433d..e9360e0de 100644
--- a/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h
+++ b/modules/juce_dsp/native/juce_sse_SIMDNativeOps.h
@@ -74,6 +74,7 @@ struct SIMDNativeOps<float>
static forcedinline __m128 JUCE_VECTOR_CALLTYPE add (__m128 a, __m128 b) noexcept { return _mm_add_ps (a, b); }
static forcedinline __m128 JUCE_VECTOR_CALLTYPE sub (__m128 a, __m128 b) noexcept { return _mm_sub_ps (a, b); }
static forcedinline __m128 JUCE_VECTOR_CALLTYPE mul (__m128 a, __m128 b) noexcept { return _mm_mul_ps (a, b); }
@@ -133,7 +123,7 @@ index 7f64d433d..e9360e0de 100644
static forcedinline __m128 JUCE_VECTOR_CALLTYPE bit_and (__m128 a, __m128 b) noexcept { return _mm_and_ps (a, b); }
static forcedinline __m128 JUCE_VECTOR_CALLTYPE bit_or (__m128 a, __m128 b) noexcept { return _mm_or_ps (a, b); }
static forcedinline __m128 JUCE_VECTOR_CALLTYPE bit_xor (__m128 a, __m128 b) noexcept { return _mm_xor_ps (a, b); }
@@ -142,6 +143,7 @@ struct SIMDNativeOps<double>
@@ -142,6 +143,7 @@ struct SIMDNativeOps<double>
static forcedinline __m128d JUCE_VECTOR_CALLTYPE add (__m128d a, __m128d b) noexcept { return _mm_add_pd (a, b); }
static forcedinline __m128d JUCE_VECTOR_CALLTYPE sub (__m128d a, __m128d b) noexcept { return _mm_sub_pd (a, b); }
static forcedinline __m128d JUCE_VECTOR_CALLTYPE mul (__m128d a, __m128d b) noexcept { return _mm_mul_pd (a, b); }
@@ -141,11 +131,11 @@ index 7f64d433d..e9360e0de 100644
static forcedinline __m128d JUCE_VECTOR_CALLTYPE bit_and (__m128d a, __m128d b) noexcept { return _mm_and_pd (a, b); }
static forcedinline __m128d JUCE_VECTOR_CALLTYPE bit_or (__m128d a, __m128d b) noexcept { return _mm_or_pd (a, b); }
static forcedinline __m128d JUCE_VECTOR_CALLTYPE bit_xor (__m128d a, __m128d b) noexcept { return _mm_xor_pd (a, b); }
diff --git a/modules/juce_events/native/juce_mac_MessageManager.mm b/modules/juce_events/native/juce_mac_MessageManager.mm
index 7a0718868..9d83519ff 100644
--- a/modules/juce_events/native/juce_mac_MessageManager.mm
+++ b/modules/juce_events/native/juce_mac_MessageManager.mm
@@ -369,6 +369,7 @@ void MessageManager::runDispatchLoop()
diff --git a/modules/juce_events/native/juce_mac_MessageManager.mm b/modules/juce_events/native/juce_mac_MessageManager.mm
index 7a0718868..9d83519ff 100644
--- a/modules/juce_events/native/juce_mac_MessageManager.mm
+++ b/modules/juce_events/native/juce_mac_MessageManager.mm
@@ -369,6 +369,7 @@ void MessageManager::runDispatchLoop()
static void shutdownNSApp()
{
[NSApp stop: nil];
@@ -153,11 +143,11 @@ index 7a0718868..9d83519ff 100644
[NSEvent startPeriodicEventsAfterDelay: 0 withPeriod: 0.1];
}
diff --git a/modules/juce_gui_basics/buttons/juce_Button.cpp b/modules/juce_gui_basics/buttons/juce_Button.cpp
index 1df2d6e20..e5c243eda 100644
--- a/modules/juce_gui_basics/buttons/juce_Button.cpp
+++ b/modules/juce_gui_basics/buttons/juce_Button.cpp
@@ -482,10 +482,7 @@ void Button::mouseDrag (const MouseEvent& e)
diff --git a/modules/juce_gui_basics/buttons/juce_Button.cpp b/modules/juce_gui_basics/buttons/juce_Button.cpp
index 1df2d6e20..e5c243eda 100644
--- a/modules/juce_gui_basics/buttons/juce_Button.cpp
+++ b/modules/juce_gui_basics/buttons/juce_Button.cpp
@@ -482,10 +482,7 @@ void Button::mouseDrag (const MouseEvent& e)
bool Button::isMouseSourceOver (const MouseEvent& e)
{
@@ -169,11 +159,11 @@ index 1df2d6e20..e5c243eda 100644
}
void Button::focusGained (FocusChangeType)
diff --git a/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp b/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp
index 314544638..f3b61e2c3 100644
--- a/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp
+++ b/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp
@@ -76,9 +76,6 @@ void ShapeButton::setShape (const Path& newShape,
diff --git a/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp b/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp
index 314544638..f3b61e2c3 100644
--- a/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp
+++ b/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp
@@ -76,9 +76,6 @@ void ShapeButton::setShape (const Path& newShape,
shape = newShape;
maintainShapeProportions = maintainShapeProportions_;
@@ -183,11 +173,11 @@ index 314544638..f3b61e2c3 100644
if (resizeNowToFitThisShape)
{
auto newBounds = shape.getBounds();
diff --git a/modules/juce_gui_basics/buttons/juce_ShapeButton.h b/modules/juce_gui_basics/buttons/juce_ShapeButton.h
index 6863b1cab..5f9cee9ee 100644
--- a/modules/juce_gui_basics/buttons/juce_ShapeButton.h
+++ b/modules/juce_gui_basics/buttons/juce_ShapeButton.h
@@ -88,6 +88,8 @@ public:
diff --git a/modules/juce_gui_basics/buttons/juce_ShapeButton.h b/modules/juce_gui_basics/buttons/juce_ShapeButton.h
index 6863b1cab..5f9cee9ee 100644
--- a/modules/juce_gui_basics/buttons/juce_ShapeButton.h
+++ b/modules/juce_gui_basics/buttons/juce_ShapeButton.h
@@ -88,6 +88,8 @@ public:
Colour overColourOn,
Colour downColourOn);
@@ -196,7 +186,7 @@ index 6863b1cab..5f9cee9ee 100644
/** Set whether the button should use the 'on' set of colours when its toggle state is 'on'.
By default these will be the same as the normal colours but the setOnColours method can be
used to provide a different set of colours.
@@ -112,9 +114,8 @@ public:
@@ -112,9 +114,8 @@ public:
private:
//==============================================================================
Colour normalColour, overColour, downColour,
@@ -207,11 +197,11 @@ index 6863b1cab..5f9cee9ee 100644
Path shape;
BorderSize<int> border;
bool maintainShapeProportions;
diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp
index fa8d3ccf5..b2d75c655 100644
--- a/modules/juce_gui_basics/components/juce_Component.cpp
+++ b/modules/juce_gui_basics/components/juce_Component.cpp
@@ -3021,7 +3021,8 @@ void Component::modifierKeysChanged (const ModifierKeys& modifiers)
diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp
index fa8d3ccf5..b2d75c655 100644
--- a/modules/juce_gui_basics/components/juce_Component.cpp
+++ b/modules/juce_gui_basics/components/juce_Component.cpp
@@ -3021,7 +3021,8 @@ void Component::modifierKeysChanged (const ModifierKeys& modifiers)
void Component::internalModifierKeysChanged()
{
@@ -221,11 +211,11 @@ index fa8d3ccf5..b2d75c655 100644
modifierKeysChanged (ModifierKeys::currentModifiers);
}
diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h
index 3add1db6b..ca84bc80e 100644
--- a/modules/juce_gui_basics/components/juce_Component.h
+++ b/modules/juce_gui_basics/components/juce_Component.h
@@ -439,7 +439,7 @@ public:
diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h
index 3add1db6b..ca84bc80e 100644
--- a/modules/juce_gui_basics/components/juce_Component.h
+++ b/modules/juce_gui_basics/components/juce_Component.h
@@ -439,7 +439,7 @@ public:
@see setBounds, ComponentListener::componentMovedOrResized
*/
@@ -234,11 +224,11 @@ index 3add1db6b..ca84bc80e 100644
/** Moves the component to a new position.
diff --git a/modules/juce_gui_basics/keyboard/juce_CaretComponent.cpp b/modules/juce_gui_basics/keyboard/juce_CaretComponent.cpp
index 7c6b83fbf..a84cf5a91 100644
--- a/modules/juce_gui_basics/keyboard/juce_CaretComponent.cpp
+++ b/modules/juce_gui_basics/keyboard/juce_CaretComponent.cpp
@@ -43,14 +43,9 @@ void CaretComponent::paint (Graphics& g)
diff --git a/modules/juce_gui_basics/keyboard/juce_CaretComponent.cpp b/modules/juce_gui_basics/keyboard/juce_CaretComponent.cpp
index 7c6b83fbf..a84cf5a91 100644
--- a/modules/juce_gui_basics/keyboard/juce_CaretComponent.cpp
+++ b/modules/juce_gui_basics/keyboard/juce_CaretComponent.cpp
@@ -43,14 +43,9 @@ void CaretComponent::paint (Graphics& g)
g.fillRect (getLocalBounds());
}
@@ -253,11 +243,11 @@ index 7c6b83fbf..a84cf5a91 100644
setVisible (shouldBeShown());
setBounds (characterArea.withWidth (2));
}
diff --git a/modules/juce_gui_basics/keyboard/juce_CaretComponent.h b/modules/juce_gui_basics/keyboard/juce_CaretComponent.h
index a10b26c69..97894c075 100644
--- a/modules/juce_gui_basics/keyboard/juce_CaretComponent.h
+++ b/modules/juce_gui_basics/keyboard/juce_CaretComponent.h
@@ -31,8 +31,7 @@ namespace juce
diff --git a/modules/juce_gui_basics/keyboard/juce_CaretComponent.h b/modules/juce_gui_basics/keyboard/juce_CaretComponent.h
index a10b26c69..97894c075 100644
--- a/modules/juce_gui_basics/keyboard/juce_CaretComponent.h
+++ b/modules/juce_gui_basics/keyboard/juce_CaretComponent.h
@@ -31,8 +31,7 @@ namespace juce
@tags{GUI}
*/
@@ -267,7 +257,7 @@ index a10b26c69..97894c075 100644
{
public:
//==============================================================================
@@ -73,7 +72,6 @@ private:
@@ -73,7 +72,6 @@ private:
Component* owner;
bool shouldBeShown() const;
@@ -275,11 +265,11 @@ index a10b26c69..97894c075 100644
JUCE_DECLARE_NON_COPYABLE (CaretComponent)
};
diff --git a/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp b/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp
index 9ea63b215..7e8f14993 100644
--- a/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp
+++ b/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp
@@ -271,23 +271,6 @@ void ComponentBoundsConstrainer::checkBounds (Rectangle<int>& bounds,
diff --git a/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp b/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp
index 9ea63b215..7e8f14993 100644
--- a/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp
+++ b/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp
@@ -271,23 +271,6 @@ void ComponentBoundsConstrainer::checkBounds (Rectangle<int>& bounds,
bounds.setWidth (roundToInt (bounds.getHeight() * aspectRatio));
}
}
@@ -303,11 +293,11 @@ index 9ea63b215..7e8f14993 100644
}
jassert (! bounds.isEmpty());
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp
index 738fed8c1..f9f79994c 100644
--- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp
@@ -41,8 +41,6 @@ LookAndFeel_V1::LookAndFeel_V1()
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp
index 738fed8c1..f9f79994c 100644
--- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.cpp
@@ -41,8 +41,6 @@ LookAndFeel_V1::LookAndFeel_V1()
setColour (PopupMenu::highlightedBackgroundColourId, Colour (0xbfa4c2ce));
setColour (PopupMenu::highlightedTextColourId, Colours::black);
setColour (TextEditor::focusedOutlineColourId, findColour (TextButton::buttonColourId));
@@ -316,7 +306,7 @@ index 738fed8c1..f9f79994c 100644
}
LookAndFeel_V1::~LookAndFeel_V1()
@@ -291,7 +289,7 @@ void LookAndFeel_V1::drawScrollbar (Graphics& g, ScrollBar& bar,
@@ -291,7 +289,7 @@ void LookAndFeel_V1::drawScrollbar (Graphics& g, ScrollBar& bar,
ImageEffectFilter* LookAndFeel_V1::getScrollbarEffect()
{
@@ -325,7 +315,7 @@ index 738fed8c1..f9f79994c 100644
}
@@ -477,7 +475,7 @@ Button* LookAndFeel_V1::createSliderButton (Slider&, const bool isIncrement)
@@ -477,7 +475,7 @@ Button* LookAndFeel_V1::createSliderButton (Slider&, const bool isIncrement)
ImageEffectFilter* LookAndFeel_V1::getSliderEffect (Slider&)
{
@@ -334,11 +324,11 @@ index 738fed8c1..f9f79994c 100644
}
int LookAndFeel_V1::getSliderThumbRadius (Slider&)
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h
index b6c05aed7..51508a57a 100644
--- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h
@@ -97,8 +97,6 @@ public:
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h
index b6c05aed7..51508a57a 100644
--- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V1.h
@@ -97,8 +97,6 @@ public:
bool positionTitleBarButtonsOnLeft) override;
private:
@@ -347,11 +337,11 @@ index b6c05aed7..51508a57a 100644
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeel_V1)
};
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp
index 21042d0b2..829fed8e6 100644
--- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp
@@ -1292,8 +1292,6 @@ void LookAndFeel_V4::drawCallOutBoxBackground (CallOutBox& box, Graphics& g,
diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp
index 21042d0b2..829fed8e6 100644
--- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp
+++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp
@@ -1292,8 +1292,6 @@ void LookAndFeel_V4::drawCallOutBoxBackground (CallOutBox& box, Graphics& g,
{
cachedImage = { Image::ARGB, box.getWidth(), box.getHeight(), true };
Graphics g2 (cachedImage);
@@ -360,11 +350,11 @@ index 21042d0b2..829fed8e6 100644
}
g.setColour (Colours::black);
diff --git a/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp b/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp
index 7c0848644..2017bccb5 100644
--- a/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp
+++ b/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp
@@ -30,9 +30,6 @@ BubbleComponent::BubbleComponent()
diff --git a/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp b/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp
index 7c0848644..2017bccb5 100644
--- a/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp
+++ b/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp
@@ -30,9 +30,6 @@ BubbleComponent::BubbleComponent()
: allowablePlacements (above | below | left | right)
{
setInterceptsMouseClicks (false, false);
@@ -374,11 +364,11 @@ index 7c0848644..2017bccb5 100644
}
BubbleComponent::~BubbleComponent() {}
diff --git a/modules/juce_gui_basics/misc/juce_BubbleComponent.h b/modules/juce_gui_basics/misc/juce_BubbleComponent.h
index f086c8ff3..cca6205a3 100644
--- a/modules/juce_gui_basics/misc/juce_BubbleComponent.h
+++ b/modules/juce_gui_basics/misc/juce_BubbleComponent.h
@@ -178,7 +178,6 @@ private:
diff --git a/modules/juce_gui_basics/misc/juce_BubbleComponent.h b/modules/juce_gui_basics/misc/juce_BubbleComponent.h
index f086c8ff3..cca6205a3 100644
--- a/modules/juce_gui_basics/misc/juce_BubbleComponent.h
+++ b/modules/juce_gui_basics/misc/juce_BubbleComponent.h
@@ -178,7 +178,6 @@ private:
Rectangle<int> content;
Point<int> arrowTip;
int allowablePlacements;
@@ -386,11 +376,11 @@ index f086c8ff3..cca6205a3 100644
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BubbleComponent)
};
diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
index f18b890f4..e92e9af14 100644
--- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
+++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
@@ -1816,7 +1816,7 @@ public:
diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
index f18b890f4..e92e9af14 100644
--- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
+++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
@@ -1816,7 +1816,7 @@ public:
if (peerIsDeleted)
return S_FALSE;
@@ -399,11 +389,11 @@ index f18b890f4..e92e9af14 100644
return S_OK;
}
diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp
index 731193ff1..0f68f6efa 100644
--- a/modules/juce_gui_basics/widgets/juce_Slider.cpp
+++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp
@@ -749,7 +749,7 @@ public:
diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp
index 731193ff1..0f68f6efa 100644
--- a/modules/juce_gui_basics/widgets/juce_Slider.cpp
+++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp
@@ -749,7 +749,7 @@ public:
? e.position.x - mouseDragStartPos.x
: mouseDragStartPos.y - e.position.y;
@@ -412,7 +402,7 @@ index 731193ff1..0f68f6efa 100644
+ mouseDiff * (1.0 / pixelsForFullDragExtent);
if (style == IncDecButtons)
@@ -763,7 +763,7 @@ public:
@@ -763,7 +763,7 @@ public:
auto mouseDiff = (e.position.x - mouseDragStartPos.x)
+ (mouseDragStartPos.y - e.position.y);
@@ -421,7 +411,7 @@ index 731193ff1..0f68f6efa 100644
+ mouseDiff * (1.0 / pixelsForFullDragExtent);
}
else
@@ -774,6 +774,7 @@ public:
@@ -774,6 +774,7 @@ public:
newPos = 1.0 - newPos;
}
@@ -429,11 +419,11 @@ index 731193ff1..0f68f6efa 100644
newPos = (isRotary() && ! rotaryParams.stopAtEnd) ? newPos - std::floor (newPos)
: jlimit (0.0, 1.0, newPos);
valueWhenLastDragged = owner.proportionOfLengthToValue (newPos);
diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp
index 233c23305..70afc33a1 100644
--- a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp
+++ b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp
@@ -833,6 +833,11 @@ struct TextEditor::TextHolderComponent : public Component,
diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp
index 233c23305..70afc33a1 100644
--- a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp
+++ b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp
@@ -833,6 +833,11 @@ struct TextEditor::TextHolderComponent : public Component,
{
owner.drawContent (g);
}
@@ -445,7 +435,7 @@ index 233c23305..70afc33a1 100644
void restartTimer()
{
@@ -1558,6 +1563,9 @@ void TextEditor::moveCaretTo (const int newPosition, const bool isSelecting)
@@ -1558,6 +1563,9 @@ void TextEditor::moveCaretTo (const int newPosition, const bool isSelecting)
moveCaret (newPosition);
selection = Range<int>::emptyRange (getCaretPosition());
}
@@ -455,7 +445,7 @@ index 233c23305..70afc33a1 100644
}
int TextEditor::getTextIndexAt (const int x, const int y)
@@ -2141,6 +2149,9 @@ void TextEditor::focusGained (FocusChangeType cause)
@@ -2141,6 +2149,9 @@ void TextEditor::focusGained (FocusChangeType cause)
repaint();
updateCaretPosition();


+ 0
- 104
libs/juce-current/patches/25_x11-crash-on-close-workaround.patch View File

@@ -1,104 +0,0 @@
diff --git a/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp b/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp
index d6508e09f..3964201a3 100644
--- a/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp
+++ b/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp
@@ -27,7 +27,6 @@ namespace juce
{
extern void* createDraggingHandCursor();
-extern ComponentPeer* getPeerFor (::Window);
//==============================================================================
class X11DragState
diff --git a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
index 490a3a792..e2194f65e 100644
--- a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
+++ b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
@@ -1378,7 +1378,49 @@ namespace ClipboardHelpers
}
//==============================================================================
-ComponentPeer* getPeerFor (::Window windowH)
+/* Workaround JUCE saving context in wrong Windows.
+ * JUCE is storing pointers as X11 Window context, but these pointers are sometimes in separate, multiple windows.
+ * This leads to double-free.
+ * Maybe X11 is the one in the wrong? It shouldn't be giving valid Window context pointers for invalid Windows...
+ */
+class ValidWindowChecker
+{
+public:
+ ValidWindowChecker (::Window windowH)
+ : oldErrorHandler (X11Symbols::getInstance()->xSetErrorHandler (s_errorCallback)),
+ wmhints (XGetWMHints (XWindowSystem::getInstance()->getDisplay(), (XID) windowH)),
+ errored (s_errorTriggered) {}
+
+ ~ValidWindowChecker()
+ {
+ if (wmhints != nullptr)
+ XFree (wmhints);
+
+ X11Symbols::getInstance()->xSetErrorHandler (oldErrorHandler);
+ s_errorTriggered = false;
+ }
+
+ bool isInvalid() const noexcept
+ {
+ return errored;
+ }
+
+private:
+ const XErrorHandler oldErrorHandler;
+ XWMHints* const wmhints;
+ const bool errored;
+
+ static bool s_errorTriggered;
+ static int s_errorCallback(::Display*, XErrorEvent*)
+ {
+ s_errorTriggered = true;
+ return 0;
+ }
+};
+bool ValidWindowChecker::s_errorTriggered = false;
+
+//==============================================================================
+ComponentPeer* getPeerFor (::Window windowH, bool checkValidWindow)
{
if (windowH == 0)
return nullptr;
@@ -1388,7 +1430,15 @@ ComponentPeer* getPeerFor (::Window windowH)
if (auto* display = XWindowSystem::getInstance()->getDisplay())
{
XWindowSystemUtilities::ScopedXLock xLock;
- X11Symbols::getInstance()->xFindContext (display, (XID) windowH, windowHandleXContext, &peer);
+ int ret = X11Symbols::getInstance()->xFindContext (display, (XID) windowH, windowHandleXContext, &peer);
+
+ if (ret == 0 && checkValidWindow)
+ {
+ const ValidWindowChecker vwc (windowH);
+
+ if (vwc.isInvalid())
+ peer = nullptr;
+ }
}
return unalignedPointerCast<ComponentPeer*> (peer);
@@ -3677,7 +3727,7 @@ void XWindowSystem::windowMessageReceive (XEvent& event)
if (! juce_handleXEmbedEvent (nullptr, &event))
#endif
{
- if (auto* peer = dynamic_cast<LinuxComponentPeer*> (getPeerFor (event.xany.window)))
+ if (auto* peer = dynamic_cast<LinuxComponentPeer*> (getPeerFor (event.xany.window, true)))
{
XWindowSystem::getInstance()->handleWindowMessage (peer, event);
return;
diff --git a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h
index 3f804a2fc..5eb22f993 100644
--- a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h
+++ b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h
@@ -261,4 +261,6 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (XWindowSystem)
};
+ComponentPeer* getPeerFor (::Window windowH, bool checkValidWindow = false);
+
} // namespace juce

+ 0
- 3
libs/juce-current/source/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp View File

@@ -28,9 +28,6 @@
//==============================================================================
#if JucePlugin_Build_VST3 && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
#if JUCE_LINUX^M
#include <arpa/inet.h>^M
#endif^M
#if JUCE_PLUGINHOST_VST3
#if JUCE_MAC


+ 1
- 0
libs/juce-current/source/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp View File

@@ -27,6 +27,7 @@ namespace juce
{
extern void* createDraggingHandCursor();
extern ComponentPeer* getPeerFor (::Window);
//==============================================================================
class X11DragState


+ 3
- 53
libs/juce-current/source/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp View File

@@ -1378,49 +1378,7 @@ namespace ClipboardHelpers
}
//==============================================================================
/* Workaround JUCE saving context in wrong Windows.
* JUCE is storing pointers as X11 Window context, but these pointers are sometimes in separate, multiple windows.
* This leads to double-free.
* Maybe X11 is the one in the wrong? It shouldn't be giving valid Window context pointers for invalid Windows...
*/
class ValidWindowChecker
{
public:
ValidWindowChecker (::Window windowH)
: oldErrorHandler (X11Symbols::getInstance()->xSetErrorHandler (s_errorCallback)),
wmhints (XGetWMHints (XWindowSystem::getInstance()->getDisplay(), (XID) windowH)),
errored (s_errorTriggered) {}
~ValidWindowChecker()
{
if (wmhints != nullptr)
XFree (wmhints);
X11Symbols::getInstance()->xSetErrorHandler (oldErrorHandler);
s_errorTriggered = false;
}
bool isInvalid() const noexcept
{
return errored;
}
private:
const XErrorHandler oldErrorHandler;
XWMHints* const wmhints;
const bool errored;
static bool s_errorTriggered;
static int s_errorCallback(::Display*, XErrorEvent*)
{
s_errorTriggered = true;
return 0;
}
};
bool ValidWindowChecker::s_errorTriggered = false;
//==============================================================================
ComponentPeer* getPeerFor (::Window windowH, bool checkValidWindow)
ComponentPeer* getPeerFor (::Window windowH)
{
if (windowH == 0)
return nullptr;
@@ -1430,15 +1388,7 @@ ComponentPeer* getPeerFor (::Window windowH, bool checkValidWindow)
if (auto* display = XWindowSystem::getInstance()->getDisplay())
{
XWindowSystemUtilities::ScopedXLock xLock;
int ret = X11Symbols::getInstance()->xFindContext (display, (XID) windowH, windowHandleXContext, &peer);
if (ret == 0 && checkValidWindow)
{
const ValidWindowChecker vwc (windowH);
if (vwc.isInvalid())
peer = nullptr;
}
X11Symbols::getInstance()->xFindContext (display, (XID) windowH, windowHandleXContext, &peer);
}
return unalignedPointerCast<ComponentPeer*> (peer);
@@ -3727,7 +3677,7 @@ void XWindowSystem::windowMessageReceive (XEvent& event)
if (! juce_handleXEmbedEvent (nullptr, &event))
#endif
{
if (auto* peer = dynamic_cast<LinuxComponentPeer*> (getPeerFor (event.xany.window, true)))
if (auto* peer = dynamic_cast<LinuxComponentPeer*> (getPeerFor (event.xany.window)))
{
XWindowSystem::getInstance()->handleWindowMessage (peer, event);
return;


+ 0
- 2
libs/juce-current/source/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h View File

@@ -263,6 +263,4 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (XWindowSystem)
};
ComponentPeer* getPeerFor (::Window windowH, bool checkValidWindow = false);
} // namespace juce

Loading…
Cancel
Save