macos: resign main/key when hiding window
This isn't done automatically for us, so we need to synthesize it in our hide helper. With this commit, we properly re-focus the new main/key window after we have closed a transient-for window.
This commit is contained in:
@@ -320,11 +320,20 @@
|
||||
|
||||
-(void)hide
|
||||
{
|
||||
BOOL wasKey = [self isKeyWindow];
|
||||
BOOL wasMain = [self isMainWindow];
|
||||
|
||||
inShowOrHide = YES;
|
||||
[self orderOut:nil];
|
||||
inShowOrHide = NO;
|
||||
|
||||
initialPositionKnown = NO;
|
||||
|
||||
if (wasMain)
|
||||
[self windowDidResignMain:nil];
|
||||
|
||||
if (wasKey)
|
||||
[self windowDidResignKey:nil];
|
||||
}
|
||||
|
||||
-(BOOL)trackManualMove
|
||||
|
||||
Reference in New Issue
Block a user