mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 04:00:00 +00:00
Merge pull request #3 from TheBrokenRail/patch-1
Implement setIsVisible
This commit is contained in:
commit
02a36f5f83
@ -2350,18 +2350,29 @@ static BOOL _allowsAutomaticWindowTabbing;
|
||||
}
|
||||
|
||||
-(void)makeKeyAndOrderFront:sender {
|
||||
if ([self isMiniaturized])
|
||||
[_platformWindow deminiaturize];
|
||||
if ([self isMiniaturized])
|
||||
[_platformWindow deminiaturize];
|
||||
|
||||
// Order window before making it key, per doc.s and behavior
|
||||
// Order window before making it key, per doc.s and behavior
|
||||
|
||||
[self orderWindow:NSWindowAbove relativeTo:0];
|
||||
[self orderWindow:NSWindowAbove relativeTo:0];
|
||||
|
||||
if([self canBecomeKeyWindow])
|
||||
[self makeKeyWindow];
|
||||
if ([self canBecomeKeyWindow])
|
||||
[self makeKeyWindow];
|
||||
|
||||
if([self canBecomeMainWindow])
|
||||
[self makeMainWindow];
|
||||
if ([self canBecomeMainWindow])
|
||||
[self makeMainWindow];
|
||||
}
|
||||
|
||||
-(void)setIsVisible:(BOOL)visible {
|
||||
if (_isVisible == visible)
|
||||
return;
|
||||
_isVisible = visible;
|
||||
if (visible) {
|
||||
[_platformWindow showWindowWithoutActivation];
|
||||
} else {
|
||||
[_platformWindow hideWindow];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)orderFront:sender {
|
||||
|
@ -247,6 +247,9 @@ static NSData *makeWindowIcon() {
|
||||
}
|
||||
}
|
||||
|
||||
-(void)showWindowWithoutActivation {
|
||||
[self ensureMapped];
|
||||
}
|
||||
|
||||
-(void)setDelegate:delegate {
|
||||
_delegate=delegate;
|
||||
|
Loading…
Reference in New Issue
Block a user