add inLiveResize to NSWindow

This commit is contained in:
Christopher Lloyd 2012-06-13 23:50:35 -04:00
parent 4f196dc700
commit 1f0e99636b
2 changed files with 8 additions and 7 deletions

View File

@ -174,7 +174,7 @@ APPKIT_EXPORT NSString * const NSWindowDidEndLiveResizeNotification;
BOOL _autorecalculatesKeyViewLoop;
BOOL _hasBeenOnScreen;
BOOL _preservesContentDuringLiveResize;
BOOL _inLiveResize;
NSSize _resizeIncrements;
NSSize _contentResizeIncrements;

View File

@ -645,7 +645,7 @@ NSString * const NSWindowDidAnimateNotification=@"NSWindowDidAnimateNotification
}
-(BOOL)preservesContentDuringLiveResize {
return _preservesContentDuringLiveResize;
return NO;
}
-(NSToolbar *)toolbar {
@ -861,9 +861,9 @@ NSString * const NSWindowDidAnimateNotification=@"NSWindowDidAnimateNotification
_makeSureIsOnAScreen=YES;
[_backgroundView setFrameSize:_frame.size];
[[self platformWindow] setFrame:_frame];
if(didSize)
[self resetCursorRects];
@ -1166,7 +1166,7 @@ NSString * const NSWindowDidAnimateNotification=@"NSWindowDidAnimateNotification
}
-(void)setPreservesContentDuringLiveResize:(BOOL)value {
_preservesContentDuringLiveResize=value;
// _preservesContentDuringLiveResize=value;
}
-(void)setRepresentedFilename:(NSString *)value {
@ -1410,8 +1410,7 @@ NSString * const NSWindowDidAnimateNotification=@"NSWindowDidAnimateNotification
}
-(BOOL)inLiveResize {
NSUnimplementedMethod();
return NO;
return _inLiveResize;
}
-(BOOL)canBecomeKeyWindow {
@ -2730,10 +2729,12 @@ NSString * const NSWindowDidAnimateNotification=@"NSWindowDidAnimateNotification
-(void)platformWindowWillBeginSizing:(CGWindow *)window {
[self postNotificationName:NSWindowWillStartLiveResizeNotification];
_inLiveResize=YES;
[_backgroundView viewWillStartLiveResize];
}
-(void)platformWindowDidEndSizing:(CGWindow *)window {
_inLiveResize=NO;
[_backgroundView viewDidEndLiveResize];
[self postNotificationName:NSWindowDidEndLiveResizeNotification];
}