mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-30 15:30:31 +00:00
add inLiveResize to NSWindow
This commit is contained in:
parent
4f196dc700
commit
1f0e99636b
@ -174,7 +174,7 @@ APPKIT_EXPORT NSString * const NSWindowDidEndLiveResizeNotification;
|
||||
BOOL _autorecalculatesKeyViewLoop;
|
||||
BOOL _hasBeenOnScreen;
|
||||
|
||||
BOOL _preservesContentDuringLiveResize;
|
||||
BOOL _inLiveResize;
|
||||
NSSize _resizeIncrements;
|
||||
NSSize _contentResizeIncrements;
|
||||
|
||||
|
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user