feat: add BrowserWindow.isOccluded()
(#38982)
feat: add BrowserWindow.isOccluded()
This commit is contained in:
parent
08236f7a9e
commit
768ece6b54
9 changed files with 89 additions and 2 deletions
|
@ -562,6 +562,14 @@ void NativeWindowViews::Hide() {
|
|||
#endif
|
||||
}
|
||||
|
||||
bool NativeWindowViews::IsOccluded() const {
|
||||
if (!GetNativeWindow())
|
||||
return false;
|
||||
auto occlusion_state =
|
||||
GetNativeWindow()->GetHost()->GetNativeWindowOcclusionState();
|
||||
return occlusion_state == aura::Window::OcclusionState::OCCLUDED;
|
||||
}
|
||||
|
||||
bool NativeWindowViews::IsVisible() const {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// widget()->IsVisible() calls ::IsWindowVisible, which returns non-zero if a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue