ckerr

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

Merged
Created: May 19, 2025, 9:22:39 AM
Merged: May 20, 2025, 10:08:45 AM
1 comments
Target: main

this was already present on macOS; use in NativeWindowViews too

Description of Change

Part 4 in a short series of PRs to reduce public use of NativeWindow::widget() so that it can be made into a protected method. See Part 1 for discussion of why I want to do that.


This PR adds NativeWindow::IsActive() on all platforms, when previously it existed only on macOS builds. WebContents::ReadyToCommitNavigation() can use this method instead of calling NativeWindow::widget()->IsActive() on Windows and Linux.

Checklist

Release Notes

Notes: none.

Backports

No Backports Requested

This pull request doesn't have any backports requested or created for older release branches.

What are backports?

Backports are copies of changes made to the main branch that are applied to older release branches. They ensure that bug fixes and important changes are available in maintained older versions of Electron.

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron