From e1ff30d8bf864dcf046ef09a3232bdda654b7b00 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 9 Dec 2015 10:41:35 +0000 Subject: [PATCH] Specialised a recent OSX window resizing change to only apply on 10.11 or later, due to problems on older OS versions. --- .../juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index ba572a8870..b9b9a2b692 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -254,8 +254,13 @@ public: } else { + // Repaint behaviour of setFrame seemed to change in 10.11, and the drawing became synchronous, + // causing performance issues. But sending an async update causes flickering in older versions, + // hence this version check to use the old behaviour on pre 10.11 machines + static bool isPre10_11 = SystemStats::getOperatingSystemType() <= SystemStats::MacOSX_10_10; + [window setFrame: [window frameRectForContentRect: flippedScreenRect (r)] - display: false]; + display: isPre10_11]; } if (oldViewSize.width != r.size.width || oldViewSize.height != r.size.height)