Created
January 3, 2010 17:18
-
-
Save jbking/268045 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j | |
index fc82ea3..86b1f58 100644 | |
--- a/AppKit/CPWindow/CPWindow.j | |
+++ b/AppKit/CPWindow/CPWindow.j | |
@@ -176,6 +176,7 @@ CPWindowWillCloseNotification = @"CPWindowWillCloseNotification"; | |
CPWindowDidBecomeMainNotification = @"CPWindowDidBecomeMainNotification"; | |
CPWindowDidResignMainNotification = @"CPWindowDidResignMainNotification"; | |
CPWindowDidMoveNotification = @"CPWindowDidMoveNotification"; | |
+CPWindowDidResizeNotification = @"CPWindowDidResizeNotification"; | |
CPWindowWillBeginSheetNotification = @"CPWindowWillBeginSheetNotification"; | |
CPWindowDidEndSheetNotification = @"CPWindowDidEndSheetNotification"; | |
CPWindowDidMiniaturizeNotification = @"CPWindowDidMiniaturizeNotification"; | |
@@ -646,7 +647,7 @@ CPTexturedBackgroundWindowMask | |
[_shadowView setFrameSize:_CGSizeMake(SHADOW_MARGIN_LEFT + size.width + SHADOW_MARGIN_RIGHT, SHADOW_MARGIN_BOTTOM + size.height + SHADOW_MARGIN_TOP + SHADOW_DISTANCE)]; | |
if (!_isAnimating && [_delegate respondsToSelector:@selector(windowDidResize:)]) | |
- [_delegate windowDidResize:self]; | |
+ [[CPNotificationCenter defaultCenter] postNotificationName:CPWindowDidResizeNotification object:self]; | |
} | |
if ([self _sharesChromeWithPlatformWindow]) | |
@@ -1028,6 +1029,13 @@ CPTexturedBackgroundWindowMask | |
selector:@selector(windowDidMove:) | |
name:CPWindowDidMoveNotification | |
object:self]; | |
+ | |
+ if ([_delegate respondsToSelector:@selector(windowDidResize:)]) | |
+ [defaultCenter | |
+ addObserver:_delegate | |
+ selector:@selector(windowDidResize:) | |
+ name:CPWindowDidResizeNotification | |
+ object:self]; | |
} | |
/*! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment