refactor: add NativeWindow::IsActive() (#47148)
this was already present on macOS; use in NativeWindowViews too
This commit is contained in:
parent
296e39456a
commit
211faed848
4 changed files with 7 additions and 6 deletions
|
@ -2007,13 +2007,8 @@ void WebContents::ReadyToCommitNavigation(
|
|||
// Don't focus content in an inactive window.
|
||||
if (!owner_window())
|
||||
return;
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
if (!owner_window()->IsActive())
|
||||
return;
|
||||
#else
|
||||
if (!owner_window()->widget()->IsActive())
|
||||
return;
|
||||
#endif
|
||||
// Don't focus content after subframe navigations.
|
||||
if (!navigation_handle->IsInMainFrame())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue