1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-18 00:54:19 +00:00

Moved some notification center addObserver calls in NSViewComponentPeer's constructor to after the window has been created

This commit is contained in:
ed 2018-07-23 09:26:17 +01:00
parent e73e1282c6
commit e68fc5e70e

View file

@ -92,24 +92,6 @@ public:
name: NSViewFrameDidChangeNotification
object: view];
if (! isSharedWindow)
{
[notificationCenter addObserver: view
selector: @selector (frameChanged:)
name: NSWindowDidMoveNotification
object: window];
[notificationCenter addObserver: view
selector: @selector (frameChanged:)
name: NSWindowDidMiniaturizeNotification
object: window];
[notificationCenter addObserver: view
selector: @selector (frameChanged:)
name: NSWindowDidDeminiaturizeNotification
object: window];
}
[view setPostsFrameChangedNotifications: YES];
if (isSharedWindow)
@ -164,6 +146,21 @@ public:
if ([window respondsToSelector: @selector (setTabbingMode:)])
[window setTabbingMode:NSWindowTabbingModeDisallowed];
#endif
[notificationCenter addObserver: view
selector: @selector (frameChanged:)
name: NSWindowDidMoveNotification
object: window];
[notificationCenter addObserver: view
selector: @selector (frameChanged:)
name: NSWindowDidMiniaturizeNotification
object: window];
[notificationCenter addObserver: view
selector: @selector (frameChanged:)
name: NSWindowDidDeminiaturizeNotification
object: window];
}
auto alpha = component.getAlpha();