Focus webview directly in offscreen mode (#12507)
This commit is contained in:
parent
c1404ff2c1
commit
52b1065b3b
1 changed files with 10 additions and 2 deletions
|
@ -512,11 +512,19 @@ void BrowserWindow::Close() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindow::Focus() {
|
void BrowserWindow::Focus() {
|
||||||
window_->Focus(true);
|
if (api_web_contents_->IsOffScreen()) {
|
||||||
|
FocusOnWebView();
|
||||||
|
} else {
|
||||||
|
window_->Focus(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindow::Blur() {
|
void BrowserWindow::Blur() {
|
||||||
window_->Focus(false);
|
if (api_web_contents_->IsOffScreen()) {
|
||||||
|
BlurWebView();
|
||||||
|
} else {
|
||||||
|
window_->Focus(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BrowserWindow::IsFocused() {
|
bool BrowserWindow::IsFocused() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue