|
|
|
@@ -726,6 +726,12 @@ public: |
|
|
|
[notificationCenter removeObserver: view
|
|
|
|
name: NSWindowWillMiniaturizeNotification
|
|
|
|
object: currentWindow];
|
|
|
|
|
|
|
|
#if JUCE_COREGRAPHICS_DRAW_ASYNC
|
|
|
|
[notificationCenter removeObserver: view
|
|
|
|
name: NSWindowDidBecomeKeyNotification
|
|
|
|
object: currentWindow];
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isSharedWindow && [view window] == window && newWindow == nullptr)
|
|
|
|
@@ -1112,6 +1118,13 @@ public: |
|
|
|
selector: dismissModalsSelector
|
|
|
|
name: NSWindowWillMiniaturizeNotification
|
|
|
|
object: currentWindow];
|
|
|
|
|
|
|
|
#if JUCE_COREGRAPHICS_DRAW_ASYNC
|
|
|
|
[notificationCenter addObserver: view
|
|
|
|
selector: becomeKeySelector
|
|
|
|
name: NSWindowDidBecomeKeyNotification
|
|
|
|
object: currentWindow];
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1121,6 +1134,11 @@ public: |
|
|
|
sendModalInputAttemptIfBlocked();
|
|
|
|
}
|
|
|
|
|
|
|
|
void becomeKey()
|
|
|
|
{
|
|
|
|
component.repaint();
|
|
|
|
}
|
|
|
|
|
|
|
|
void liveResizingStart()
|
|
|
|
{
|
|
|
|
if (constrainer == nullptr)
|
|
|
|
@@ -1488,6 +1506,7 @@ public: |
|
|
|
static const SEL frameChangedSelector;
|
|
|
|
static const SEL asyncMouseDownSelector;
|
|
|
|
static const SEL asyncMouseUpSelector;
|
|
|
|
static const SEL becomeKeySelector;
|
|
|
|
|
|
|
|
private:
|
|
|
|
static NSView* createViewInstance();
|
|
|
|
@@ -1657,6 +1676,7 @@ const SEL NSViewComponentPeer::dismissModalsSelector = @selector (dismissModals |
|
|
|
const SEL NSViewComponentPeer::frameChangedSelector = @selector (frameChanged:);
|
|
|
|
const SEL NSViewComponentPeer::asyncMouseDownSelector = @selector (asyncMouseDown:);
|
|
|
|
const SEL NSViewComponentPeer::asyncMouseUpSelector = @selector (asyncMouseUp:);
|
|
|
|
const SEL NSViewComponentPeer::becomeKeySelector = @selector (becomeKey:);
|
|
|
|
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
@@ -1727,6 +1747,7 @@ struct JuceNSViewClass : public ObjCClass<NSView> |
|
|
|
addMethod (NSViewComponentPeer::asyncMouseDownSelector, asyncMouseDown, "v@:@");
|
|
|
|
addMethod (NSViewComponentPeer::asyncMouseUpSelector, asyncMouseUp, "v@:@");
|
|
|
|
addMethod (NSViewComponentPeer::frameChangedSelector, frameChanged, "v@:@");
|
|
|
|
addMethod (NSViewComponentPeer::becomeKeySelector, becomeKey, "v@:@");
|
|
|
|
|
|
|
|
addProtocol (@protocol (NSTextInput));
|
|
|
|
|
|
|
|
@@ -1795,6 +1816,7 @@ private: |
|
|
|
static void frameChanged (id self, SEL, NSNotification*) { if (auto* p = getOwner (self)) p->redirectMovedOrResized(); }
|
|
|
|
static void viewDidMoveToWindow (id self, SEL) { if (auto* p = getOwner (self)) p->viewMovedToWindow(); }
|
|
|
|
static void dismissModals (id self, SEL) { if (auto* p = getOwner (self)) p->dismissModals(); }
|
|
|
|
static void becomeKey (id self, SEL) { if (auto* p = getOwner (self)) p->becomeKey(); }
|
|
|
|
|
|
|
|
static void viewWillDraw (id self, SEL)
|
|
|
|
{
|
|
|
|
|