@@ -1,16 +0,0 @@ | |||
diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | |||
index 29df141..bc4b02a 100644 | |||
--- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | |||
+++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | |||
@@ -1166,8 +1162,10 @@ public: | |||
editorComp->addToDesktop (0, ptr); | |||
hostWindow = (HWND) ptr; | |||
#elif JUCE_LINUX | |||
- editorComp->addToDesktop (0, ptr); | |||
+ editorComp->addToDesktop (0); | |||
hostWindow = (Window) ptr; | |||
+ Window editorWnd = (Window) editorComp->getWindowHandle(); | |||
+ XReparentWindow (display, editorWnd, hostWindow, 0, 0); | |||
#else | |||
hostWindow = attachComponentToWindowRef (editorComp, ptr, useNSView); | |||
#endif |
@@ -1,5 +1,5 @@ | |||
diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp | |||
index fad5eea..79a1b51 100644 | |||
index 4a18ca5..f129775 100644 | |||
--- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp | |||
+++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp | |||
@@ -159,8 +159,8 @@ void AudioDeviceManager::createAudioDeviceTypes (OwnedArray<AudioIODeviceType>& | |||
@@ -1,8 +1,8 @@ | |||
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h | |||
index aaae9ef..b39fe63 100644 | |||
index 6cfad5d..be9aa3b 100644 | |||
--- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h | |||
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h | |||
@@ -594,6 +594,11 @@ public: | |||
@@ -652,6 +652,11 @@ public: | |||
virtual void numChannelsChanged(); | |||
//============================================================================== | |||
@@ -1,5 +1,5 @@ | |||
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp | |||
index e46dba3..0dffb42 100644 | |||
index 0dda683..2df1163 100644 | |||
--- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp | |||
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp | |||
@@ -44,9 +44,11 @@ AudioProcessor::AudioProcessor() | |||
@@ -12,7 +12,7 @@ index e46dba3..0dffb42 100644 | |||
jassert (activeEditor == nullptr); | |||
+ #endif | |||
#if JUCE_DEBUG | |||
#if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING | |||
// This will fail if you've called beginParameterChangeGesture() for one | |||
@@ -321,6 +323,7 @@ void AudioProcessor::suspendProcessing (const bool shouldBeSuspended) | |||
void AudioProcessor::reset() {} | |||
@@ -31,10 +31,10 @@ index e46dba3..0dffb42 100644 | |||
//============================================================================== | |||
void AudioProcessor::getCurrentProgramStateInformation (juce::MemoryBlock& destData) | |||
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h | |||
index b39fe63..9fe9911 100644 | |||
index be9aa3b..4b6ea85 100644 | |||
--- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h | |||
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h | |||
@@ -327,6 +327,7 @@ public: | |||
@@ -333,6 +333,7 @@ public: | |||
*/ | |||
virtual void setNonRealtime (bool isNonRealtime) noexcept; | |||
@@ -42,7 +42,7 @@ index b39fe63..9fe9911 100644 | |||
//============================================================================== | |||
/** Creates the filter's UI. | |||
@@ -372,6 +373,7 @@ public: | |||
@@ -378,6 +379,7 @@ public: | |||
This may call createEditor() internally to create the component. | |||
*/ | |||
AudioProcessorEditor* createEditorIfNeeded(); | |||
@@ -50,7 +50,7 @@ index b39fe63..9fe9911 100644 | |||
//============================================================================== | |||
/** This must return the correct value immediately after the object has been | |||
@@ -616,9 +618,11 @@ public: | |||
@@ -674,9 +676,11 @@ public: | |||
/** This is called by the processor to specify its details before being played. */ | |||
void setPlayConfigDetails (int numIns, int numOuts, double sampleRate, int blockSize) noexcept; | |||
@@ -62,7 +62,7 @@ index b39fe63..9fe9911 100644 | |||
/** Not for public use - this is called to initialise the processor before playing. */ | |||
void setSpeakerArrangement (const String& inputs, const String& outputs); | |||
@@ -671,7 +675,9 @@ protected: | |||
@@ -729,7 +733,9 @@ protected: | |||
private: | |||
Array<AudioProcessorListener*> listeners; | |||
@@ -72,3 +72,44 @@ index b39fe63..9fe9911 100644 | |||
double sampleRate; | |||
int blockSize, numInputChannels, numOutputChannels, latencySamples; | |||
bool suspended, nonRealtime; | |||
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp | |||
index 84dd0e2..e71b884 100644 | |||
--- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp | |||
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp | |||
@@ -1482,8 +1482,10 @@ bool AudioProcessorGraph::AudioGraphIOProcessor::isOutputChannelStereoPair (int | |||
bool AudioProcessorGraph::AudioGraphIOProcessor::isInput() const noexcept { return type == audioInputNode || type == midiInputNode; } | |||
bool AudioProcessorGraph::AudioGraphIOProcessor::isOutput() const noexcept { return type == audioOutputNode || type == midiOutputNode; } | |||
+#if ! JUCE_AUDIO_PROCESSOR_NO_GUI | |||
bool AudioProcessorGraph::AudioGraphIOProcessor::hasEditor() const { return false; } | |||
AudioProcessorEditor* AudioProcessorGraph::AudioGraphIOProcessor::createEditor() { return nullptr; } | |||
+#endif | |||
int AudioProcessorGraph::AudioGraphIOProcessor::getNumPrograms() { return 0; } | |||
int AudioProcessorGraph::AudioGraphIOProcessor::getCurrentProgram() { return 0; } | |||
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h | |||
index 2079a53..f6d1a63 100644 | |||
--- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h | |||
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h | |||
@@ -319,8 +319,10 @@ public: | |||
bool acceptsMidi() const override; | |||
bool producesMidi() const override; | |||
+#if ! JUCE_AUDIO_PROCESSOR_NO_GUI | |||
bool hasEditor() const override; | |||
AudioProcessorEditor* createEditor() override; | |||
+#endif | |||
int getNumPrograms() override; | |||
int getCurrentProgram() override; | |||
@@ -361,8 +363,10 @@ public: | |||
bool acceptsMidi() const override; | |||
bool producesMidi() const override; | |||
+#if ! JUCE_AUDIO_PROCESSOR_NO_GUI | |||
bool hasEditor() const override { return false; } | |||
AudioProcessorEditor* createEditor() override { return nullptr; } | |||
+#endif | |||
int getNumPrograms() override { return 0; } | |||
int getCurrentProgram() override { return 0; } | |||
void setCurrentProgram (int) override { } |
@@ -1,41 +0,0 @@ | |||
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp | |||
index 84dd0e2..e71b884 100644 | |||
--- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp | |||
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp | |||
@@ -1482,8 +1482,10 @@ bool AudioProcessorGraph::AudioGraphIOProcessor::isOutputChannelStereoPair (int | |||
bool AudioProcessorGraph::AudioGraphIOProcessor::isInput() const noexcept { return type == audioInputNode || type == midiInputNode; } | |||
bool AudioProcessorGraph::AudioGraphIOProcessor::isOutput() const noexcept { return type == audioOutputNode || type == midiOutputNode; } | |||
+#if ! JUCE_AUDIO_PROCESSOR_NO_GUI | |||
bool AudioProcessorGraph::AudioGraphIOProcessor::hasEditor() const { return false; } | |||
AudioProcessorEditor* AudioProcessorGraph::AudioGraphIOProcessor::createEditor() { return nullptr; } | |||
+#endif | |||
int AudioProcessorGraph::AudioGraphIOProcessor::getNumPrograms() { return 0; } | |||
int AudioProcessorGraph::AudioGraphIOProcessor::getCurrentProgram() { return 0; } | |||
diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h | |||
index 319218f..6be1848 100644 | |||
--- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h | |||
+++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h | |||
@@ -319,8 +319,10 @@ public: | |||
bool acceptsMidi() const override; | |||
bool producesMidi() const override; | |||
+#if ! JUCE_AUDIO_PROCESSOR_NO_GUI | |||
bool hasEditor() const override; | |||
AudioProcessorEditor* createEditor() override; | |||
+#endif | |||
int getNumPrograms() override; | |||
int getCurrentProgram() override; | |||
@@ -361,8 +363,10 @@ public: | |||
bool acceptsMidi() const override; | |||
bool producesMidi() const override; | |||
+#if ! JUCE_AUDIO_PROCESSOR_NO_GUI | |||
bool hasEditor() const override { return false; } | |||
AudioProcessorEditor* createEditor() override { return nullptr; } | |||
+#endif | |||
int getNumPrograms() override { return 0; } | |||
int getCurrentProgram() override { return 0; } | |||
void setCurrentProgram (int) override { } |
@@ -1,20 +1,8 @@ | |||
From 53f89fdb53d4e2deced8f841d1130fe1ece16afd Mon Sep 17 00:00:00 2001 | |||
From: falkTX <falktx@gmail.com> | |||
Date: Sat, 18 Oct 2014 23:05:06 +0100 | |||
Subject: [PATCH] Re-add juce getPID() | |||
--- | |||
modules/juce_core/native/juce_posix_SharedCode.h | 5 +++++ | |||
modules/juce_core/native/juce_win32_Threads.cpp | 5 +++++ | |||
modules/juce_core/threads/juce_ChildProcess.cpp | 5 +++++ | |||
modules/juce_core/threads/juce_ChildProcess.h | 2 ++ | |||
4 files changed, 17 insertions(+) | |||
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/source/modules/juce_core/native/juce_posix_SharedCode.h | |||
index 757105b..3574420 100644 | |||
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h | |||
index e682eae..17a5307 100644 | |||
--- a/modules/juce_core/native/juce_posix_SharedCode.h | |||
+++ b/modules/juce_core/native/juce_posix_SharedCode.h | |||
@@ -1116,6 +1116,11 @@ class ChildProcess::ActiveProcess | |||
@@ -1121,6 +1121,11 @@ public: | |||
return 0; | |||
} | |||
@@ -26,11 +14,11 @@ index 757105b..3574420 100644 | |||
int childPID; | |||
private: | |||
diff --git a/modules/juce_core/native/juce_win32_Threads.cpp b/source/modules/juce_core/native/juce_win32_Threads.cpp | |||
diff --git a/modules/juce_core/native/juce_win32_Threads.cpp b/modules/juce_core/native/juce_win32_Threads.cpp | |||
index 1421c10..ca22ea0 100644 | |||
--- a/modules/juce_core/native/juce_win32_Threads.cpp | |||
+++ b/modules/juce_core/native/juce_win32_Threads.cpp | |||
@@ -534,6 +534,11 @@ class ChildProcess::ActiveProcess | |||
@@ -534,6 +534,11 @@ public: | |||
return (uint32) exitCode; | |||
} | |||
@@ -42,7 +30,7 @@ index 1421c10..ca22ea0 100644 | |||
bool ok; | |||
private: | |||
diff --git a/modules/juce_core/threads/juce_ChildProcess.cpp b/source/modules/juce_core/threads/juce_ChildProcess.cpp | |||
diff --git a/modules/juce_core/threads/juce_ChildProcess.cpp b/modules/juce_core/threads/juce_ChildProcess.cpp | |||
index 4566b13..e984837 100644 | |||
--- a/modules/juce_core/threads/juce_ChildProcess.cpp | |||
+++ b/modules/juce_core/threads/juce_ChildProcess.cpp | |||
@@ -58,11 +46,11 @@ index 4566b13..e984837 100644 | |||
//============================================================================== | |||
#if JUCE_UNIT_TESTS | |||
diff --git a/modules/juce_core/threads/juce_ChildProcess.h b/source/modules/juce_core/threads/juce_ChildProcess.h | |||
diff --git a/modules/juce_core/threads/juce_ChildProcess.h b/modules/juce_core/threads/juce_ChildProcess.h | |||
index 0adcb57..7a1c88c 100644 | |||
--- a/modules/juce_core/threads/juce_ChildProcess.h | |||
+++ b/modules/juce_core/threads/juce_ChildProcess.h | |||
@@ -106,6 +106,8 @@ class JUCE_API ChildProcess | |||
@@ -106,6 +106,8 @@ public: | |||
*/ | |||
bool kill(); | |||
@@ -45,10 +45,10 @@ index bcb3723..a834b03 100644 | |||
return o.runModal(); | |||
} | |||
diff --git a/modules/juce_gui_basics/windows/juce_DialogWindow.h b/modules/juce_gui_basics/windows/juce_DialogWindow.h | |||
index 01cbec1..b0cf197 100644 | |||
index b7c18df..aac4f43 100644 | |||
--- a/modules/juce_gui_basics/windows/juce_DialogWindow.h | |||
+++ b/modules/juce_gui_basics/windows/juce_DialogWindow.h | |||
@@ -193,7 +193,8 @@ public: | |||
@@ -189,7 +189,8 @@ public: | |||
Colour backgroundColour, | |||
bool escapeKeyTriggersCloseButton, | |||
bool shouldBeResizable = false, | |||
@@ -58,7 +58,7 @@ index 01cbec1..b0cf197 100644 | |||
#if JUCE_MODAL_LOOPS_PERMITTED || DOXYGEN | |||
/** Easy way of quickly showing a dialog box containing a given component. | |||
@@ -241,7 +242,8 @@ public: | |||
@@ -235,7 +236,8 @@ public: | |||
Colour backgroundColour, | |||
bool escapeKeyTriggersCloseButton, | |||
bool shouldBeResizable = false, | |||
@@ -0,0 +1,51 @@ | |||
diff --git a/modules/juce_gui_basics/misc/juce_DropShadower.cpp b/modules/juce_gui_basics/misc/juce_DropShadower.cpp | |||
index c6d0d77..18b706d 100644 | |||
--- a/modules/juce_gui_basics/misc/juce_DropShadower.cpp | |||
+++ b/modules/juce_gui_basics/misc/juce_DropShadower.cpp | |||
@@ -31,7 +31,7 @@ public: | |||
setVisible (true); | |||
setInterceptsMouseClicks (false, false); | |||
- if (comp->isOnDesktop()) | |||
+ if (! comp->isOnDesktop()) | |||
{ | |||
setSize (1, 1); // to keep the OS happy by not having zero-size windows | |||
addToDesktop (ComponentPeer::windowIgnoresMouseClicks | |||
diff --git a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp | |||
index 7573f8a..ff1993c 100644 | |||
--- a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp | |||
+++ b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp | |||
@@ -2879,8 +2879,9 @@ private: | |||
{ | |||
Atom netHints [2]; | |||
- if ((styleFlags & windowIsTemporary) != 0 | |||
- || ((styleFlags & windowHasDropShadow) == 0 && Desktop::canUseSemiTransparentWindows())) | |||
+ if (styleFlags & windowIsTemporary) | |||
+ netHints [0] = Atoms::getIfExists ("_NET_WM_WINDOW_TYPE_TOOLTIP"); | |||
+ else if ((styleFlags & windowHasDropShadow) == 0 && Desktop::canUseSemiTransparentWindows()) | |||
netHints [0] = Atoms::getIfExists ("_NET_WM_WINDOW_TYPE_COMBO"); | |||
else | |||
netHints [0] = Atoms::getIfExists ("_NET_WM_WINDOW_TYPE_NORMAL"); | |||
@@ -2930,7 +2931,7 @@ private: | |||
swa.border_pixel = 0; | |||
swa.background_pixmap = None; | |||
swa.colormap = colormap; | |||
- swa.override_redirect = (component.isAlwaysOnTop() && (styleFlags & windowIsTemporary) != 0) ? True : False; | |||
+ swa.override_redirect = (styleFlags & windowIsTemporary) ? True : False; | |||
swa.event_mask = getAllEventsMask(); | |||
windowH = XCreateWindow (display, parentToAddTo != 0 ? parentToAddTo : root, | |||
diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp | |||
index 75f9c1c..4e07676 100644 | |||
--- a/modules/juce_gui_basics/widgets/juce_Slider.cpp | |||
+++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp | |||
@@ -868,7 +868,7 @@ public: | |||
if (parentForPopupDisplay != nullptr) | |||
parentForPopupDisplay->addChildComponent (popup); | |||
else | |||
- popup->addToDesktop (0); | |||
+ popup->addToDesktop (ComponentPeer::windowIsTemporary); | |||
popup->setVisible (true); | |||
} |
@@ -1,24 +1,24 @@ | |||
diff --git a/modules/juce_audio_basics/juce_audio_basics.cpp b/modules/juce_audio_basics/juce_audio_basics.cpp | |||
index da98659..685e7c4 100644 | |||
index 814e102..7676305 100644 | |||
--- a/modules/juce_audio_basics/juce_audio_basics.cpp | |||
+++ b/modules/juce_audio_basics/juce_audio_basics.cpp | |||
@@ -76,6 +76,7 @@ namespace juce | |||
@@ -79,6 +79,7 @@ namespace juce | |||
#include "buffers/juce_AudioSampleBuffer.cpp" | |||
#include "buffers/juce_FloatVectorOperations.cpp" | |||
#include "effects/juce_IIRFilter.cpp" | |||
+#include "effects/juce_IIRFilterOld.cpp" | |||
#include "effects/juce_LagrangeInterpolator.cpp" | |||
#include "effects/juce_FFT.cpp" | |||
#include "midi/juce_MidiBuffer.cpp" | |||
#include "midi/juce_MidiFile.cpp" | |||
diff --git a/modules/juce_audio_basics/juce_audio_basics.h b/modules/juce_audio_basics/juce_audio_basics.h | |||
index 70c5432..c9ce9ab 100644 | |||
index 106df2b..6554126 100644 | |||
--- a/modules/juce_audio_basics/juce_audio_basics.h | |||
+++ b/modules/juce_audio_basics/juce_audio_basics.h | |||
@@ -36,6 +36,7 @@ namespace juce | |||
@@ -39,6 +39,7 @@ namespace juce | |||
#include "buffers/juce_FloatVectorOperations.h" | |||
#include "effects/juce_Decibels.h" | |||
#include "effects/juce_IIRFilter.h" | |||
+#include "effects/juce_IIRFilterOld.h" | |||
#include "effects/juce_LagrangeInterpolator.h" | |||
#include "effects/juce_FFT.h" | |||
#include "effects/juce_Reverb.h" | |||
#include "midi/juce_MidiMessage.h" |
@@ -1,23 +1,8 @@ | |||
diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | |||
index 5f2f29e..b88a3b2 100644 | |||
--- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | |||
+++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | |||
@@ -214,9 +214,9 @@ public: | |||
void run() override | |||
{ | |||
initialiseJuce_GUI(); | |||
- initialised = true; | |||
MessageManager::getInstance()->setCurrentThreadAsMessageThread(); | |||
+ initialised = true; | |||
while ((! threadShouldExit()) && MessageManager::getInstance()->runDispatchLoopUntil (250)) | |||
{} | |||
diff --git a/modules/juce_events/native/juce_linux_Messaging.cpp b/modules/juce_events/native/juce_linux_Messaging.cpp | |||
index 48e28a7..9f17ab1 100644 | |||
index b2eaece..6e17abb 100644 | |||
--- a/modules/juce_events/native/juce_linux_Messaging.cpp | |||
+++ b/modules/juce_events/native/juce_linux_Messaging.cpp | |||
@@ -358,8 +358,13 @@ bool MessageManager::postMessageToSystemQueue (MessageManager::MessageBase* cons | |||
@@ -360,8 +360,13 @@ bool MessageManager::postMessageToSystemQueue (MessageManager::MessageBase* cons | |||
if (LinuxErrorHandling::errorOccurred) | |||
return false; | |||
@@ -0,0 +1,13 @@ | |||
diff --git a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp | |||
index 1bb2413..8479bc3 100644 | |||
--- a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp | |||
+++ b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp | |||
@@ -26,7 +26,7 @@ | |||
} // (juce namespace) | |||
-#include <ladspa.h> | |||
+#include "ladspa.h" | |||
namespace juce | |||
{ |
@@ -0,0 +1,35 @@ | |||
diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h | |||
index 30fdd10..7a71ad8 100644 | |||
--- a/modules/juce_core/maths/juce_MathsFunctions.h | |||
+++ b/modules/juce_core/maths/juce_MathsFunctions.h | |||
@@ -367,7 +367,7 @@ inline bool juce_isfinite (NumericType) noexcept | |||
template <> | |||
inline bool juce_isfinite (float value) noexcept | |||
{ | |||
- #if JUCE_WINDOWS | |||
+ #if JUCE_MSVC | |||
return _finite (value) != 0; | |||
#else | |||
return std::isfinite (value); | |||
@@ -377,7 +377,7 @@ inline bool juce_isfinite (float value) noexcept | |||
template <> | |||
inline bool juce_isfinite (double value) noexcept | |||
{ | |||
- #if JUCE_WINDOWS | |||
+ #if JUCE_MSVC | |||
return _finite (value) != 0; | |||
#else | |||
return std::isfinite (value); | |||
diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h | |||
index cdaa0ef..55c0c8c 100644 | |||
--- a/modules/juce_core/native/juce_BasicNativeHeaders.h | |||
+++ b/modules/juce_core/native/juce_BasicNativeHeaders.h | |||
@@ -87,7 +87,7 @@ | |||
#define STRICT 1 | |||
#define WIN32_LEAN_AND_MEAN 1 | |||
#if JUCE_MINGW | |||
- #define _WIN32_WINNT 0x0501 | |||
+ #define _WIN32_WINNT 0x0502 | |||
#else | |||
#define _WIN32_WINNT 0x0600 | |||
#endif |
@@ -1,13 +0,0 @@ | |||
diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h | |||
index cdaa0ef..55c0c8c 100644 | |||
--- a/modules/juce_core/native/juce_BasicNativeHeaders.h | |||
+++ b/modules/juce_core/native/juce_BasicNativeHeaders.h | |||
@@ -87,7 +87,7 @@ | |||
#define STRICT 1 | |||
#define WIN32_LEAN_AND_MEAN 1 | |||
#if JUCE_MINGW | |||
- #define _WIN32_WINNT 0x0501 | |||
+ #define _WIN32_WINNT 0x0502 | |||
#else | |||
#define _WIN32_WINNT 0x0600 | |||
#endif |
@@ -1,8 +1,8 @@ | |||
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h | |||
index 0895697..2163d9c 100644 | |||
--- a/modules/juce_core/native/juce_posix_SharedCode.h | |||
+++ b/modules/juce_core/native/juce_posix_SharedCode.h | |||
@@ -596,12 +596,38 @@ File juce_getExecutableFile() | |||
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h | |||
index 17a5307..abcf358 100644 | |||
--- a/modules/juce_core/native/juce_posix_SharedCode.h | |||
+++ b/modules/juce_core/native/juce_posix_SharedCode.h | |||
@@ -596,12 +596,38 @@ File juce_getExecutableFile() | |||
{ | |||
Dl_info exeInfo; | |||
dladdr ((void*) juce_getExecutableFile, &exeInfo); | |||
@@ -1,17 +1,19 @@ | |||
diff --git a/modules/juce_core/native/juce_linux_Files.cpp b/modules/juce_core/native/juce_linux_Files.cpp | |||
index f26f516..a0941ab 100644 | |||
index 3c38624..a0941ab 100644 | |||
--- a/modules/juce_core/native/juce_linux_Files.cpp | |||
+++ b/modules/juce_core/native/juce_linux_Files.cpp | |||
@@ -219,7 +219,7 @@ bool Process::openDocument (const String& fileName, const String& parameters) | |||
@@ -219,17 +219,22 @@ bool Process::openDocument (const String& fileName, const String& parameters) | |||
cmdString = cmdLines.joinIntoString (" || "); | |||
} | |||
- const char* const argv[4] = { "/bin/sh", "-c", cmdString.toUTF8(), 0 }; | |||
+ const char* const argv[4] = { "/bin/sh", "-c", cmdString.toUTF8(), nullptr }; | |||
#if JUCE_USE_VFORK | |||
const int cpid = vfork(); | |||
@@ -229,11 +229,12 @@ bool Process::openDocument (const String& fileName, const String& parameters) | |||
+#if JUCE_USE_VFORK | |||
+ const int cpid = vfork(); | |||
+#else | |||
const int cpid = fork(); | |||
+#endif | |||
if (cpid == 0) | |||
{ | |||
@@ -28,19 +30,22 @@ index f26f516..a0941ab 100644 | |||
return cpid >= 0; | |||
diff --git a/modules/juce_core/native/juce_mac_Files.mm b/modules/juce_core/native/juce_mac_Files.mm | |||
index d7bd74a..fdebd69 100644 | |||
index 0a00e92..fdebd69 100644 | |||
--- a/modules/juce_core/native/juce_mac_Files.mm | |||
+++ b/modules/juce_core/native/juce_mac_Files.mm | |||
@@ -110,7 +110,7 @@ namespace FileHelpers | |||
@@ -110,23 +110,22 @@ namespace FileHelpers | |||
static bool launchExecutable (const String& pathAndArguments) | |||
{ | |||
- const char* const argv[4] = { "/bin/sh", "-c", pathAndArguments.toUTF8(), 0 }; | |||
+ const char* const argv[4] = { "/bin/sh", "-c", pathAndArguments.toUTF8(), nullptr }; | |||
#if JUCE_USE_VFORK | |||
const int cpid = vfork(); | |||
@@ -121,16 +121,11 @@ namespace FileHelpers | |||
+#if JUCE_USE_VFORK | |||
+ const int cpid = vfork(); | |||
+#else | |||
const int cpid = fork(); | |||
+#endif | |||
if (cpid == 0) | |||
{ | |||
// Child process | |||
@@ -61,13 +66,49 @@ index d7bd74a..fdebd69 100644 | |||
} | |||
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h | |||
index ffacdec..17def66 100644 | |||
index abcf358..17def66 100644 | |||
--- a/modules/juce_core/native/juce_posix_SharedCode.h | |||
+++ b/modules/juce_core/native/juce_posix_SharedCode.h | |||
@@ -1083,8 +1083,8 @@ public: | |||
@@ -1046,7 +1046,18 @@ public: | |||
if (pipe (pipeHandles) == 0) | |||
{ | |||
+ Array<char*> argv; | |||
+ for (int i = 0; i < arguments.size(); ++i) | |||
+ if (arguments[i].isNotEmpty()) | |||
+ argv.add (const_cast<char*> (arguments[i].toUTF8().getAddress())); | |||
+ | |||
+ argv.add (nullptr); | |||
+ | |||
+#if JUCE_USE_VFORK | |||
+ const pid_t result = vfork(); | |||
+#else | |||
const pid_t result = fork(); | |||
+#endif | |||
if (result < 0) | |||
{ | |||
@@ -1055,6 +1066,7 @@ public: | |||
} | |||
else if (result == 0) | |||
{ | |||
+#if ! JUCE_USE_VFORK | |||
// we're the child process.. | |||
close (pipeHandles[0]); // close the read handle | |||
@@ -1069,16 +1081,10 @@ public: | |||
close (STDERR_FILENO); | |||
close (pipeHandles[1]); | |||
#endif | |||
+#endif | |||
- Array<char*> argv; | |||
- for (int i = 0; i < arguments.size(); ++i) | |||
- if (arguments[i].isNotEmpty()) | |||
- argv.add (const_cast<char*> (arguments[i].toUTF8().getAddress())); | |||
- | |||
- argv.add (nullptr); | |||
- | |||
- execvp (argv[0], argv.getRawDataPointer()); | |||
- exit (-1); | |||
+ if (execvp (argv[0], argv.getRawDataPointer()) < 0) |
@@ -1,78 +0,0 @@ | |||
diff --git a/modules/juce_core/native/juce_linux_Files.cpp b/modules/juce_core/native/juce_linux_Files.cpp | |||
index d0dd54d..088877d 100644 | |||
--- a/modules/juce_core/native/juce_linux_Files.cpp | |||
+++ b/modules/juce_core/native/juce_linux_Files.cpp | |||
@@ -218,7 +218,11 @@ bool Process::openDocument (const String& fileName, const String& parameters) | |||
const char* const argv[4] = { "/bin/sh", "-c", cmdString.toUTF8(), 0 }; | |||
+#if JUCE_USE_VFORK | |||
+ const int cpid = vfork(); | |||
+#else | |||
const int cpid = fork(); | |||
+#endif | |||
if (cpid == 0) | |||
{ | |||
diff --git a/modules/juce_core/native/juce_mac_Files.mm b/modules/juce_core/native/juce_mac_Files.mm | |||
index 0a00e92..d7bd74a 100644 | |||
--- a/modules/juce_core/native/juce_mac_Files.mm | |||
+++ b/modules/juce_core/native/juce_mac_Files.mm | |||
@@ -112,7 +112,11 @@ namespace FileHelpers | |||
{ | |||
const char* const argv[4] = { "/bin/sh", "-c", pathAndArguments.toUTF8(), 0 }; | |||
+#if JUCE_USE_VFORK | |||
+ const int cpid = vfork(); | |||
+#else | |||
const int cpid = fork(); | |||
+#endif | |||
if (cpid == 0) | |||
{ | |||
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h | |||
index 91785d6..757105b 100644 | |||
--- a/modules/juce_core/native/juce_posix_SharedCode.h | |||
+++ b/modules/juce_core/native/juce_posix_SharedCode.h | |||
@@ -1009,7 +1009,18 @@ public: | |||
if (pipe (pipeHandles) == 0) | |||
{ | |||
+ Array<char*> argv; | |||
+ for (int i = 0; i < arguments.size(); ++i) | |||
+ if (arguments[i].isNotEmpty()) | |||
+ argv.add (const_cast<char*> (arguments[i].toUTF8().getAddress())); | |||
+ | |||
+ argv.add (nullptr); | |||
+ | |||
+#if JUCE_USE_VFORK | |||
+ const pid_t result = vfork(); | |||
+#else | |||
const pid_t result = fork(); | |||
+#endif | |||
if (result < 0) | |||
{ | |||
@@ -1018,6 +1029,7 @@ public: | |||
} | |||
else if (result == 0) | |||
{ | |||
+#if ! JUCE_USE_VFORK | |||
// we're the child process.. | |||
close (pipeHandles[0]); // close the read handle | |||
@@ -1032,13 +1044,7 @@ public: | |||
close (STDERR_FILENO); | |||
close (pipeHandles[1]); | |||
- | |||
- Array<char*> argv; | |||
- for (int i = 0; i < arguments.size(); ++i) | |||
- if (arguments[i].isNotEmpty()) | |||
- argv.add (const_cast<char*> (arguments[i].toUTF8().getAddress())); | |||
- | |||
- argv.add (nullptr); | |||
+#endif | |||
execvp (argv[0], argv.getRawDataPointer()); | |||
exit (-1); |
@@ -1,5 +1,5 @@ | |||
diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | |||
index 9229b24..5f9e037 100644 | |||
index 0086d80..7e0564f 100644 | |||
--- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | |||
+++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | |||
@@ -108,6 +108,7 @@ | |||
@@ -10,7 +10,18 @@ index 9229b24..5f9e037 100644 | |||
#ifdef _MSC_VER | |||
#pragma pack (pop) | |||
@@ -284,10 +285,6 @@ public: | |||
@@ -213,9 +214,9 @@ public: | |||
void run() override | |||
{ | |||
initialiseJuce_GUI(); | |||
- initialised = true; | |||
MessageManager::getInstance()->setCurrentThreadAsMessageThread(); | |||
+ initialised = true; | |||
while ((! threadShouldExit()) && MessageManager::getInstance()->runDispatchLoopUntil (250)) | |||
{} | |||
@@ -285,10 +286,6 @@ public: | |||
setInitialDelay (filter->getLatencySamples()); | |||
programsAreChunks (true); | |||
@@ -21,7 +32,7 @@ index 9229b24..5f9e037 100644 | |||
activePlugins.add (this); | |||
} | |||
@@ -351,7 +348,7 @@ public: | |||
@@ -352,7 +349,7 @@ public: | |||
//============================================================================== | |||
bool getEffectName (char* name) override | |||
{ | |||
@@ -31,7 +42,7 @@ index 9229b24..5f9e037 100644 | |||
} | |||
diff --git a/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp b/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp | |||
index 82e7e47..8400493 100644 | |||
index 1e87c49..5fdb8c2 100644 | |||
--- a/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp | |||
+++ b/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp | |||
@@ -31,7 +31,6 @@ |
@@ -1982,6 +1982,7 @@ public: | |||
pos.getX(), pos.getY(), | |||
(unsigned int) getWidth(), | |||
(unsigned int) getHeight()); | |||
XMapRaised (display, pluginWindow); | |||
XFlush (display); | |||
} | |||
@@ -3802,35 +3802,6 @@ void MouseInputSource::setRawMousePosition (Point<float> newPosition) | |||
double Desktop::getDefaultMasterScale() | |||
{ | |||
// Ubuntu and derived distributions now save a per-display scale factor as a configuration | |||
// variable. This can be changed in the Monitor system settings panel. | |||
ChildProcess dconf; | |||
if (File ("/usr/bin/dconf").existsAsFile() && | |||
dconf.start ("/usr/bin/dconf read /com/ubuntu/user-interface/scale-factor", ChildProcess::wantStdOut)) | |||
{ | |||
if (dconf.waitForProcessToFinish (200)) | |||
{ | |||
String jsonOutput = dconf.readAllProcessOutput().replaceCharacter ('\'', '"'); | |||
if (dconf.getExitCode() == 0 && jsonOutput.isNotEmpty()) | |||
{ | |||
var jsonVar = JSON::parse (jsonOutput); | |||
if (DynamicObject* object = jsonVar.getDynamicObject()) | |||
{ | |||
NamedValueSet& scaleFactors = object->getProperties(); | |||
double maxScaleFactor = 1.0; | |||
for (int i = 0; i < scaleFactors.size(); ++i) | |||
maxScaleFactor = jmax (maxScaleFactor, (double) (scaleFactors.getValueAt (i)) / 8.0); | |||
return maxScaleFactor; | |||
} | |||
} | |||
} | |||
} | |||
return 1.0; | |||
} | |||