fix: child window alwaysOnTop level persistence (#29956)

This commit is contained in:
Shelley Vohr
2021-07-01 16:22:37 +02:00
committed by GitHub
parent 8779a3ac0f
commit bde3d403a8
6 changed files with 51 additions and 6 deletions

View File

@@ -867,6 +867,10 @@ void BaseWindow::SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value) {
}
#if defined(OS_MAC)
std::string BaseWindow::GetAlwaysOnTopLevel() {
return window_->GetAlwaysOnTopLevel();
}
void BaseWindow::SetWindowButtonVisibility(bool visible) {
window_->SetWindowButtonVisibility(visible);
}
@@ -1253,6 +1257,7 @@ void BaseWindow::BuildPrototype(v8::Isolate* isolate,
.SetMethod("isVisibleOnAllWorkspaces",
&BaseWindow::IsVisibleOnAllWorkspaces)
#if defined(OS_MAC)
.SetMethod("_getAlwaysOnTopLevel", &BaseWindow::GetAlwaysOnTopLevel)
.SetMethod("setAutoHideCursor", &BaseWindow::SetAutoHideCursor)
#endif
.SetMethod("setVibrancy", &BaseWindow::SetVibrancy)

View File

@@ -191,6 +191,7 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
virtual void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value);
#if defined(OS_MAC)
std::string GetAlwaysOnTopLevel();
void SetWindowButtonVisibility(bool visible);
bool GetWindowButtonVisibility() const;
void SetTrafficLightPosition(const gfx::Point& position);