From 05624e835456d19aa24042edc4c6e92affbfebf5 Mon Sep 17 00:00:00 2001 From: hogliux Date: Thu, 7 Sep 2017 16:19:14 +0100 Subject: [PATCH] AU: Disable CoreAnimation resizing transitions for AU plug-in windows --- .../AU/juce_AU_Wrapper.mm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm index ac92ab10a4..7c05c6de7a 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm @@ -23,7 +23,6 @@ ============================================================================== */ - #include "../../juce_core/system/juce_TargetPlatform.h" #include "../utility/juce_CheckSettingMacros.h" @@ -51,6 +50,7 @@ #include #include #include +#include #include "CoreAudioUtilityClasses/MusicDeviceBase.h" /** The BUILD_AU_CARBON_UI flag lets you specify whether old-school carbon hosts are supported as @@ -1320,8 +1320,15 @@ public: r.origin.y = r.origin.y + r.size.height - component.getHeight(); r.size.width = component.getWidth(); r.size.height = component.getHeight(); + + [CATransaction begin]; + [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; + [[view superview] setFrame: r]; [view setFrame: makeNSRect (component.getLocalBounds())]; + + [CATransaction commit]; + [view setNeedsDisplay: YES]; } @@ -1389,8 +1396,14 @@ public: NSRect r = [[view superview] frame]; r.size.width = editor->getWidth(); r.size.height = editor->getHeight(); + + [CATransaction begin]; + [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; + [[view superview] setFrame: r]; [view setFrame: makeNSRect (editor->getLocalBounds())]; + [CATransaction commit]; + [view setNeedsDisplay: YES]; } }