mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-01 18:58:22 +00:00
Use a notificaiton rather than a direct call for windowDidResize:
Closes #393.
This commit is contained in:
1 parent
8b17cd3cde
commit
09345a9d53
1 file changed
+9
-2
@@ -680,8 +680,8 @@ CPTexturedBackgroundWindowMask
|
||||
if (_hasShadow)
|
||||
[_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];
|
||||
if (!_isAnimating)
|
||||
[[CPNotificationCenter defaultCenter] postNotificationName:CPWindowDidResizeNotification object:self];
|
||||
}
|
||||
|
||||
if ([self _sharesChromeWithPlatformWindow])
|
||||
@@ -1086,6 +1086,13 @@ CPTexturedBackgroundWindowMask
|
||||
selector:@selector(windowDidMove:)
|
||||
name:CPWindowDidMoveNotification
|
||||
object:self];
|
||||
|
||||
if ([_delegate respondsToSelector:@selector(windowDidResize:)])
|
||||
[defaultCenter
|
||||
addObserver:_delegate
|
||||
selector:@selector(windowDidResize:)
|
||||
name:CPWindowDidResizeNotification
|
||||
object:self];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in new issue
Block a user