| @@ -1753,6 +1753,14 @@ public: | |||||
| // For more recent KDE's... | // For more recent KDE's... | ||||
| trayAtom = XInternAtom (display, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", false); | trayAtom = XInternAtom (display, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", false); | ||||
| XChangeProperty (display, windowH, trayAtom, XA_WINDOW, 32, PropModeReplace, (unsigned char*) &windowH, 1); | XChangeProperty (display, windowH, trayAtom, XA_WINDOW, 32, PropModeReplace, (unsigned char*) &windowH, 1); | ||||
| // a minimum size must be specified for GNOME and Xfce, otherwise the icon is displayed with a width of 1 | |||||
| XSizeHints* hints = XAllocSizeHints(); | |||||
| hints->flags = PMinSize; | |||||
| hints->min_width = 22; | |||||
| hints->min_height = 22; | |||||
| XSetWMNormalHints (display, windowH, hints); | |||||
| XFree (hints); | |||||
| } | } | ||||
| void deleteTaskBarIcon() | void deleteTaskBarIcon() | ||||
| @@ -3250,7 +3258,11 @@ void SystemTrayIconComponent::paint (Graphics& g) | |||||
| const Image* const image = wp->getTaskbarIcon(); | const Image* const image = wp->getTaskbarIcon(); | ||||
| if (image != 0) | if (image != 0) | ||||
| g.drawImageAt (image, 0, 0, false); | |||||
| { | |||||
| g.drawImageWithin (image, 0, 0, getWidth(), getHeight(), | |||||
| RectanglePlacement::xLeft | RectanglePlacement::yTop | RectanglePlacement::onlyReduceInSize, | |||||
| false); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -638,49 +638,38 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| if (! hasCreatedTempChannels) | |||||
| int i; | |||||
| for (i = 0; i < numOut; ++i) | |||||
| { | { | ||||
| // do this just once when we start processing.. | |||||
| hasCreatedTempChannels = true; | |||||
| float* chan = (float*) tempChannels.getUnchecked(i); | |||||
| // if some output channels are disabled, some hosts supply the same buffer | |||||
| // for multiple channels - this buggers up our method of copying the | |||||
| // inputs over the outputs, so we need to create unique temp buffers in this case.. | |||||
| for (int i = 0; i < numOut; ++i) | |||||
| if (chan == 0) | |||||
| { | { | ||||
| chan = outputs[i]; | |||||
| // if some output channels are disabled, some hosts supply the same buffer | |||||
| // for multiple channels - this buggers up our method of copying the | |||||
| // inputs over the outputs, so we need to create unique temp buffers in this case.. | |||||
| for (int j = i; --j >= 0;) | for (int j = i; --j >= 0;) | ||||
| { | { | ||||
| if (outputs[j] == outputs[i] && outputs[i] != 0) | |||||
| if (outputs[j] == chan) | |||||
| { | { | ||||
| tempChannels.set (i, juce_malloc (sizeof (float) * blockSize * 2)); | |||||
| chan = juce_malloc (sizeof (float) * blockSize * 2); | |||||
| tempChannels.set (i, chan); | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| { | |||||
| int i; | |||||
| for (i = 0; i < numOut; ++i) | |||||
| { | |||||
| // if some output channels are disabled, the host may pass the same dummy buffer | |||||
| // pointer for all of these outputs - and that means that we'd be copying all our | |||||
| // input channels into the same place... so in this case, we use an internal dummy | |||||
| // buffer which has enough channels for each input. | |||||
| float* chan = (float*) tempChannels.getUnchecked(i); | |||||
| if (chan == 0) | |||||
| chan = outputs[i]; | |||||
| if (i < numIn && chan != inputs[i]) | |||||
| memcpy (chan, inputs[i], sizeof (float) * numSamples); | |||||
| channels[i] = chan; | |||||
| } | |||||
| if (i < numIn && chan != inputs[i]) | |||||
| memcpy (chan, inputs[i], sizeof (float) * numSamples); | |||||
| for (; i < numIn; ++i) | |||||
| channels[i] = inputs[i]; | |||||
| channels[i] = chan; | |||||
| } | } | ||||
| for (; i < numIn; ++i) | |||||
| channels[i] = inputs[i]; | |||||
| AudioSampleBuffer chans (channels, jmax (numIn, numOut), numSamples); | AudioSampleBuffer chans (channels, jmax (numIn, numOut), numSamples); | ||||
| filter->processBlock (chans, midiEvents); | filter->processBlock (chans, midiEvents); | ||||
| @@ -123,6 +123,24 @@ | |||||
| #define JUCE_USE_OGGVORBIS 1 | #define JUCE_USE_OGGVORBIS 1 | ||||
| #endif | #endif | ||||
| //============================================================================= | |||||
| /** These flags let you turn off the direct inclusion of various 3rd-party libs | |||||
| in the build. | |||||
| You might need to turn these off if you're linking with these libs yourself | |||||
| are struggling with name-clashes. | |||||
| */ | |||||
| #ifndef JUCE_INCLUDE_ZLIB_CODE | |||||
| #define JUCE_INCLUDE_ZLIB_CODE 1 | |||||
| #endif | |||||
| #ifndef JUCE_INCLUDE_OGGVORBIS_CODE | |||||
| #define JUCE_INCLUDE_OGGVORBIS_CODE 1 | |||||
| #endif | |||||
| #ifndef JUCE_INCLUDE_FLAC_CODE | |||||
| #define JUCE_INCLUDE_FLAC_CODE 1 | |||||
| #endif | |||||
| //============================================================================= | //============================================================================= | ||||
| /** This flag lets you enable support for CD-burning. You might want to disable | /** This flag lets you enable support for CD-burning. You might want to disable | ||||
| it to build without the MS SDK under windows. | it to build without the MS SDK under windows. | ||||
| @@ -159,7 +177,7 @@ | |||||
| /** Enabling this builds support for VST audio plugins. | /** Enabling this builds support for VST audio plugins. | ||||
| @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU | @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU | ||||
| */ | */ | ||||
| //#define JUCE_PLUGINHOST_VST 1 | |||||
| #define JUCE_PLUGINHOST_VST 1 | |||||
| /** Enabling this builds support for AudioUnit audio plugins. | /** Enabling this builds support for AudioUnit audio plugins. | ||||
| @see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST | @see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST | ||||
| @@ -45,29 +45,33 @@ | |||||
| namespace FlacNamespace | namespace FlacNamespace | ||||
| { | { | ||||
| #define FLAC__NO_DLL 1 | |||||
| #if JUCE_INCLUDE_FLAC_CODE | |||||
| #define FLAC__NO_DLL 1 | |||||
| #if ! defined (SIZE_MAX) | |||||
| #if ! defined (SIZE_MAX) | |||||
| #define SIZE_MAX 0xffffffff | #define SIZE_MAX 0xffffffff | ||||
| #endif | |||||
| #define __STDC_LIMIT_MACROS 1 | |||||
| #include "flac/all.h" | |||||
| #include "flac/libFLAC/bitmath.c" | |||||
| #include "flac/libFLAC/bitreader.c" | |||||
| #include "flac/libFLAC/bitwriter.c" | |||||
| #include "flac/libFLAC/cpu.c" | |||||
| #include "flac/libFLAC/crc.c" | |||||
| #include "flac/libFLAC/fixed.c" | |||||
| #include "flac/libFLAC/float.c" | |||||
| #include "flac/libFLAC/format.c" | |||||
| #include "flac/libFLAC/lpc_flac.c" | |||||
| #include "flac/libFLAC/md5.c" | |||||
| #include "flac/libFLAC/memory.c" | |||||
| #include "flac/libFLAC/stream_decoder.c" | |||||
| #include "flac/libFLAC/stream_encoder.c" | |||||
| #include "flac/libFLAC/stream_encoder_framing.c" | |||||
| #include "flac/libFLAC/window_flac.c" | |||||
| #else | |||||
| #include <FLAC/all.h> | |||||
| #endif | #endif | ||||
| #define __STDC_LIMIT_MACROS 1 | |||||
| #include "flac/all.h" | |||||
| #include "flac/libFLAC/bitmath.c" | |||||
| #include "flac/libFLAC/bitreader.c" | |||||
| #include "flac/libFLAC/bitwriter.c" | |||||
| #include "flac/libFLAC/cpu.c" | |||||
| #include "flac/libFLAC/crc.c" | |||||
| #include "flac/libFLAC/fixed.c" | |||||
| #include "flac/libFLAC/float.c" | |||||
| #include "flac/libFLAC/format.c" | |||||
| #include "flac/libFLAC/lpc_flac.c" | |||||
| #include "flac/libFLAC/md5.c" | |||||
| #include "flac/libFLAC/memory.c" | |||||
| #include "flac/libFLAC/stream_decoder.c" | |||||
| #include "flac/libFLAC/stream_encoder.c" | |||||
| #include "flac/libFLAC/stream_encoder_framing.c" | |||||
| #include "flac/libFLAC/window_flac.c" | |||||
| } | } | ||||
| #ifdef _MSC_VER | #ifdef _MSC_VER | ||||
| @@ -42,33 +42,39 @@ | |||||
| namespace OggVorbisNamespace | namespace OggVorbisNamespace | ||||
| { | { | ||||
| #include "oggvorbis/vorbisenc.h" | |||||
| #include "oggvorbis/codec.h" | |||||
| #include "oggvorbis/vorbisfile.h" | |||||
| #include "oggvorbis/bitwise.c" | |||||
| #include "oggvorbis/framing.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/analysis.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/bitrate.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/block.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/codebook.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/envelope.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/floor0.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/floor1.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/info.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/lpc.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/lsp.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/mapping0.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/mdct.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/psy.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/registry.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/res0.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/sharedbook.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/smallft.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/synthesis.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/vorbisenc.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/vorbisfile.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/window.c" | |||||
| #if JUCE_INCLUDE_OGGVORBIS_CODE | |||||
| #include "oggvorbis/vorbisenc.h" | |||||
| #include "oggvorbis/codec.h" | |||||
| #include "oggvorbis/vorbisfile.h" | |||||
| #include "oggvorbis/bitwise.c" | |||||
| #include "oggvorbis/framing.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/analysis.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/bitrate.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/block.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/codebook.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/envelope.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/floor0.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/floor1.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/info.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/lpc.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/lsp.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/mapping0.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/mdct.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/psy.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/registry.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/res0.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/sharedbook.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/smallft.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/synthesis.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/vorbisenc.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/vorbisfile.c" | |||||
| #include "oggvorbis/libvorbis-1.1.2/lib/window.c" | |||||
| #else | |||||
| #include <vorbis/vorbisenc.h> | |||||
| #include <vorbis/codec.h> | |||||
| #include <vorbis/vorbisfile.h> | |||||
| #endif | |||||
| } | } | ||||
| BEGIN_JUCE_NAMESPACE | BEGIN_JUCE_NAMESPACE | ||||
| @@ -375,9 +375,10 @@ void ComponentPeer::handleMessage (const Message& message) | |||||
| { | { | ||||
| if (message.intParameter1 == fakeMouseMoveMessage) | if (message.intParameter1 == fakeMouseMoveMessage) | ||||
| { | { | ||||
| handleMouseMove (message.intParameter2, | |||||
| message.intParameter3, | |||||
| Time::currentTimeMillis()); | |||||
| if (! ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown()) | |||||
| handleMouseMove (message.intParameter2, | |||||
| message.intParameter3, | |||||
| Time::currentTimeMillis()); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1137,7 +1137,7 @@ private: | |||||
| tokens.trim(); | tokens.trim(); | ||||
| tokens.removeEmptyStrings(); | tokens.removeEmptyStrings(); | ||||
| if (tokens[0].containsChar T('%')) | |||||
| if (tokens[0].containsChar (T('%'))) | |||||
| return Colour ((uint8) roundDoubleToInt (2.55 * tokens[0].getDoubleValue()), | return Colour ((uint8) roundDoubleToInt (2.55 * tokens[0].getDoubleValue()), | ||||
| (uint8) roundDoubleToInt (2.55 * tokens[1].getDoubleValue()), | (uint8) roundDoubleToInt (2.55 * tokens[1].getDoubleValue()), | ||||
| (uint8) roundDoubleToInt (2.55 * tokens[2].getDoubleValue())); | (uint8) roundDoubleToInt (2.55 * tokens[2].getDoubleValue())); | ||||
| @@ -38,6 +38,7 @@ | |||||
| namespace zlibNamespace | namespace zlibNamespace | ||||
| { | { | ||||
| #if JUCE_INCLUDE_ZLIB_CODE | |||||
| extern "C" | extern "C" | ||||
| { | { | ||||
| #undef OS_CODE | #undef OS_CODE | ||||
| @@ -68,6 +69,9 @@ namespace zlibNamespace | |||||
| #include "zlib/zutil.c" | #include "zlib/zutil.c" | ||||
| #undef Byte | #undef Byte | ||||
| } | } | ||||
| #else | |||||
| #include <zlib.h> | |||||
| #endif | |||||
| } | } | ||||
| #if JUCE_MSVC | #if JUCE_MSVC | ||||