From a5d26db341789413aebf57bab3aab1ddfbe68153 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 10 Jul 2020 16:18:21 +0100 Subject: [PATCH] macOS: Call superclass constrainFrameRect for NSWindow to ensure that native title bar stays on screen --- .../juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index b90b78944e..4971c5fec3 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -2055,7 +2055,12 @@ private: static NSRect constrainFrameRect (id self, SEL, NSRect frameRect, NSScreen* screen) { if (auto* owner = getOwner (self)) + { + frameRect = sendSuperclassMessage (self, @selector (constrainFrameRect:toScreen:), + frameRect, screen); + frameRect = owner->constrainRect (frameRect); + } return frameRect; }