mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
feat: add BrowserWindow.isOccluded() (#38982)
feat: add BrowserWindow.isOccluded()
This commit is contained in:
@@ -355,6 +355,10 @@ bool BaseWindow::IsVisible() const {
|
||||
return window_->IsVisible();
|
||||
}
|
||||
|
||||
bool BaseWindow::IsOccluded() const {
|
||||
return window_->IsOccluded();
|
||||
}
|
||||
|
||||
bool BaseWindow::IsEnabled() const {
|
||||
return window_->IsEnabled();
|
||||
}
|
||||
@@ -1086,6 +1090,7 @@ void BaseWindow::BuildPrototype(v8::Isolate* isolate,
|
||||
.SetMethod("showInactive", &BaseWindow::ShowInactive)
|
||||
.SetMethod("hide", &BaseWindow::Hide)
|
||||
.SetMethod("isVisible", &BaseWindow::IsVisible)
|
||||
.SetMethod("isOccluded", &BaseWindow::IsOccluded)
|
||||
.SetMethod("isEnabled", &BaseWindow::IsEnabled)
|
||||
.SetMethod("setEnabled", &BaseWindow::SetEnabled)
|
||||
.SetMethod("maximize", &BaseWindow::Maximize)
|
||||
|
||||
@@ -98,6 +98,7 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||
void ShowInactive();
|
||||
void Hide();
|
||||
bool IsVisible() const;
|
||||
bool IsOccluded() const;
|
||||
bool IsEnabled() const;
|
||||
void SetEnabled(bool enable);
|
||||
void Maximize();
|
||||
|
||||
Reference in New Issue
Block a user