mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Remove focus from CEF when AtomController resigns as main window. Add focus when it becomes the main window.
This commit is contained in:
committed by
Nathan Sobo
parent
7387ad13f6
commit
b673d40fd5
@@ -129,6 +129,17 @@
|
||||
}
|
||||
|
||||
#pragma mark NSWindowDelegate
|
||||
- (void)windowDidResignMain:(NSNotification *)notification {
|
||||
if (_clientHandler && _clientHandler->GetBrowser()) {
|
||||
_clientHandler->GetBrowser()->SendFocusEvent(false);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeMain:(NSNotification *)notification {
|
||||
if (_clientHandler && _clientHandler->GetBrowser()) {
|
||||
_clientHandler->GetBrowser()->SendFocusEvent(true);
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)windowShouldClose:(id)window {
|
||||
CefRefPtr<CefV8Context> context = _clientHandler->GetBrowser()->GetMainFrame()->GetV8Context();
|
||||
|
||||
Reference in New Issue
Block a user