fix: window accentColor should adhere to native window behavior (#48012)

* fix: window accentColor should adhere to native window behavior

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: address review feedback

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: remove duplicate UpdateWindowAccentColor call in ctor

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* refactor: add NativeWindow::IsActive() (#47148)

this was already present on macOS; use in NativeWindowViews too

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2025-08-08 22:22:34 +02:00 committed by GitHub
commit b6dbb2bab7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 18 additions and 13 deletions

View file

@ -2014,13 +2014,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;