feat: remove visibleOnFullscreen option (#21706)
This commit is contained in:
parent
48ae7552f6
commit
2858471151
8 changed files with 9 additions and 24 deletions
|
@ -1627,12 +1627,9 @@ can still bring up the menu bar by pressing the single `Alt` key.
|
||||||
|
|
||||||
Returns `Boolean` - Whether the menu bar is visible.
|
Returns `Boolean` - Whether the menu bar is visible.
|
||||||
|
|
||||||
#### `win.setVisibleOnAllWorkspaces(visible[, options])`
|
#### `win.setVisibleOnAllWorkspaces(visible)`
|
||||||
|
|
||||||
* `visible` Boolean
|
* `visible` Boolean
|
||||||
* `options` Object (optional)
|
|
||||||
* `visibleOnFullScreen` Boolean (optional) _macOS_ - Sets whether
|
|
||||||
the window should be visible above fullscreen windows
|
|
||||||
|
|
||||||
Sets whether the window should be visible on all workspaces.
|
Sets whether the window should be visible on all workspaces.
|
||||||
|
|
||||||
|
|
|
@ -790,13 +790,8 @@ void TopLevelWindow::SetOverlayIcon(const gfx::Image& overlay,
|
||||||
window_->SetOverlayIcon(overlay, description);
|
window_->SetOverlayIcon(overlay, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TopLevelWindow::SetVisibleOnAllWorkspaces(bool visible,
|
void TopLevelWindow::SetVisibleOnAllWorkspaces(bool visible) {
|
||||||
gin_helper::Arguments* args) {
|
return window_->SetVisibleOnAllWorkspaces(visible);
|
||||||
gin_helper::Dictionary options;
|
|
||||||
bool visibleOnFullScreen = false;
|
|
||||||
args->GetNext(&options) &&
|
|
||||||
options.Get("visibleOnFullScreen", &visibleOnFullScreen);
|
|
||||||
return window_->SetVisibleOnAllWorkspaces(visible, visibleOnFullScreen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TopLevelWindow::IsVisibleOnAllWorkspaces() {
|
bool TopLevelWindow::IsVisibleOnAllWorkspaces() {
|
||||||
|
|
|
@ -181,7 +181,7 @@ class TopLevelWindow : public gin_helper::TrackableObject<TopLevelWindow>,
|
||||||
void SetProgressBar(double progress, gin_helper::Arguments* args);
|
void SetProgressBar(double progress, gin_helper::Arguments* args);
|
||||||
void SetOverlayIcon(const gfx::Image& overlay,
|
void SetOverlayIcon(const gfx::Image& overlay,
|
||||||
const std::string& description);
|
const std::string& description);
|
||||||
void SetVisibleOnAllWorkspaces(bool visible, gin_helper::Arguments* args);
|
void SetVisibleOnAllWorkspaces(bool visible);
|
||||||
bool IsVisibleOnAllWorkspaces();
|
bool IsVisibleOnAllWorkspaces();
|
||||||
void SetAutoHideCursor(bool auto_hide);
|
void SetAutoHideCursor(bool auto_hide);
|
||||||
virtual void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value);
|
virtual void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value);
|
||||||
|
|
|
@ -185,8 +185,7 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
const std::string& description) = 0;
|
const std::string& description) = 0;
|
||||||
|
|
||||||
// Workspace APIs.
|
// Workspace APIs.
|
||||||
virtual void SetVisibleOnAllWorkspaces(bool visible,
|
virtual void SetVisibleOnAllWorkspaces(bool visible) = 0;
|
||||||
bool visibleOnFullScreen = false) = 0;
|
|
||||||
|
|
||||||
virtual bool IsVisibleOnAllWorkspaces() = 0;
|
virtual bool IsVisibleOnAllWorkspaces() = 0;
|
||||||
|
|
||||||
|
|
|
@ -117,8 +117,7 @@ class NativeWindowMac : public NativeWindow {
|
||||||
void SetOverlayIcon(const gfx::Image& overlay,
|
void SetOverlayIcon(const gfx::Image& overlay,
|
||||||
const std::string& description) override;
|
const std::string& description) override;
|
||||||
|
|
||||||
void SetVisibleOnAllWorkspaces(bool visible,
|
void SetVisibleOnAllWorkspaces(bool visible) override;
|
||||||
bool visibleOnFullScreen) override;
|
|
||||||
bool IsVisibleOnAllWorkspaces() override;
|
bool IsVisibleOnAllWorkspaces() override;
|
||||||
|
|
||||||
void SetAutoHideCursor(bool auto_hide) override;
|
void SetAutoHideCursor(bool auto_hide) override;
|
||||||
|
|
|
@ -1271,11 +1271,8 @@ void NativeWindowMac::SetProgressBar(double progress,
|
||||||
void NativeWindowMac::SetOverlayIcon(const gfx::Image& overlay,
|
void NativeWindowMac::SetOverlayIcon(const gfx::Image& overlay,
|
||||||
const std::string& description) {}
|
const std::string& description) {}
|
||||||
|
|
||||||
void NativeWindowMac::SetVisibleOnAllWorkspaces(bool visible,
|
void NativeWindowMac::SetVisibleOnAllWorkspaces(bool visible) {
|
||||||
bool visibleOnFullScreen) {
|
|
||||||
SetCollectionBehavior(visible, NSWindowCollectionBehaviorCanJoinAllSpaces);
|
SetCollectionBehavior(visible, NSWindowCollectionBehaviorCanJoinAllSpaces);
|
||||||
SetCollectionBehavior(visibleOnFullScreen,
|
|
||||||
NSWindowCollectionBehaviorFullScreenAuxiliary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsVisibleOnAllWorkspaces() {
|
bool NativeWindowMac::IsVisibleOnAllWorkspaces() {
|
||||||
|
|
|
@ -1156,8 +1156,7 @@ bool NativeWindowViews::IsMenuBarVisible() {
|
||||||
return root_view_->IsMenuBarVisible();
|
return root_view_->IsMenuBarVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowViews::SetVisibleOnAllWorkspaces(bool visible,
|
void NativeWindowViews::SetVisibleOnAllWorkspaces(bool visible) {
|
||||||
bool visibleOnFullScreen) {
|
|
||||||
widget()->SetVisibleOnAllWorkspaces(visible);
|
widget()->SetVisibleOnAllWorkspaces(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,8 +123,7 @@ class NativeWindowViews : public NativeWindow,
|
||||||
void SetMenuBarVisibility(bool visible) override;
|
void SetMenuBarVisibility(bool visible) override;
|
||||||
bool IsMenuBarVisible() override;
|
bool IsMenuBarVisible() override;
|
||||||
|
|
||||||
void SetVisibleOnAllWorkspaces(bool visible,
|
void SetVisibleOnAllWorkspaces(bool visible) override;
|
||||||
bool visibleOnFullScreen) override;
|
|
||||||
|
|
||||||
bool IsVisibleOnAllWorkspaces() override;
|
bool IsVisibleOnAllWorkspaces() override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue