mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Make browser properly unfocus when resigning main window status
This commit is contained in:
@@ -147,15 +147,10 @@
|
||||
|
||||
# pragma mark NSWindowDelegate
|
||||
|
||||
- (void)windowDidResignMain:(NSNotification *)notification {
|
||||
if (_cefClient && _cefClient->GetBrowser() && !_runningSpecs) {
|
||||
_cefClient->GetBrowser()->GetHost()->SetFocus(false);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeMain:(NSNotification *)notification {
|
||||
if (_cefClient && _cefClient->GetBrowser()) {
|
||||
_cefClient->GetBrowser()->GetHost()->SetFocus(true);
|
||||
- (void)windowDidResignMain:(NSNotification *)notification {
|
||||
if (!_runningSpecs) {
|
||||
[self.window makeFirstResponder:nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user