Only mac needs to call SetActive
This commit is contained in:
parent
4c7b48e596
commit
e7f175d578
1 changed files with 4 additions and 0 deletions
|
@ -364,18 +364,22 @@ void BrowserWindow::OnWindowEndSession() {
|
|||
|
||||
void BrowserWindow::OnWindowBlur() {
|
||||
web_contents()->StoreFocus();
|
||||
#if defined(OS_MACOSX)
|
||||
auto* rwhv = web_contents()->GetRenderWidgetHostView();
|
||||
if (rwhv)
|
||||
rwhv->SetActive(false);
|
||||
#endif
|
||||
|
||||
Emit("blur");
|
||||
}
|
||||
|
||||
void BrowserWindow::OnWindowFocus() {
|
||||
web_contents()->RestoreFocus();
|
||||
#if defined(OS_MACOSX)
|
||||
auto* rwhv = web_contents()->GetRenderWidgetHostView();
|
||||
if (rwhv)
|
||||
rwhv->SetActive(true);
|
||||
#endif
|
||||
|
||||
Emit("focus");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue