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.
|
||||
|
||||
#### `win.setVisibleOnAllWorkspaces(visible[, options])`
|
||||
#### `win.setVisibleOnAllWorkspaces(visible)`
|
||||
|
||||
* `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.
|
||||
|
||||
|
|
|
@ -790,13 +790,8 @@ void TopLevelWindow::SetOverlayIcon(const gfx::Image& overlay,
|
|||
window_->SetOverlayIcon(overlay, description);
|
||||
}
|
||||
|
||||
void TopLevelWindow::SetVisibleOnAllWorkspaces(bool visible,
|
||||
gin_helper::Arguments* args) {
|
||||
gin_helper::Dictionary options;
|
||||
bool visibleOnFullScreen = false;
|
||||
args->GetNext(&options) &&
|
||||
options.Get("visibleOnFullScreen", &visibleOnFullScreen);
|
||||
return window_->SetVisibleOnAllWorkspaces(visible, visibleOnFullScreen);
|
||||
void TopLevelWindow::SetVisibleOnAllWorkspaces(bool visible) {
|
||||
return window_->SetVisibleOnAllWorkspaces(visible);
|
||||
}
|
||||
|
||||
bool TopLevelWindow::IsVisibleOnAllWorkspaces() {
|
||||
|
|
|
@ -181,7 +181,7 @@ class TopLevelWindow : public gin_helper::TrackableObject<TopLevelWindow>,
|
|||
void SetProgressBar(double progress, gin_helper::Arguments* args);
|
||||
void SetOverlayIcon(const gfx::Image& overlay,
|
||||
const std::string& description);
|
||||
void SetVisibleOnAllWorkspaces(bool visible, gin_helper::Arguments* args);
|
||||
void SetVisibleOnAllWorkspaces(bool visible);
|
||||
bool IsVisibleOnAllWorkspaces();
|
||||
void SetAutoHideCursor(bool auto_hide);
|
||||
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;
|
||||
|
||||
// Workspace APIs.
|
||||
virtual void SetVisibleOnAllWorkspaces(bool visible,
|
||||
bool visibleOnFullScreen = false) = 0;
|
||||
virtual void SetVisibleOnAllWorkspaces(bool visible) = 0;
|
||||
|
||||
virtual bool IsVisibleOnAllWorkspaces() = 0;
|
||||
|
||||
|
|
|
@ -117,8 +117,7 @@ class NativeWindowMac : public NativeWindow {
|
|||
void SetOverlayIcon(const gfx::Image& overlay,
|
||||
const std::string& description) override;
|
||||
|
||||
void SetVisibleOnAllWorkspaces(bool visible,
|
||||
bool visibleOnFullScreen) override;
|
||||
void SetVisibleOnAllWorkspaces(bool visible) override;
|
||||
bool IsVisibleOnAllWorkspaces() override;
|
||||
|
||||
void SetAutoHideCursor(bool auto_hide) override;
|
||||
|
|
|
@ -1271,11 +1271,8 @@ void NativeWindowMac::SetProgressBar(double progress,
|
|||
void NativeWindowMac::SetOverlayIcon(const gfx::Image& overlay,
|
||||
const std::string& description) {}
|
||||
|
||||
void NativeWindowMac::SetVisibleOnAllWorkspaces(bool visible,
|
||||
bool visibleOnFullScreen) {
|
||||
void NativeWindowMac::SetVisibleOnAllWorkspaces(bool visible) {
|
||||
SetCollectionBehavior(visible, NSWindowCollectionBehaviorCanJoinAllSpaces);
|
||||
SetCollectionBehavior(visibleOnFullScreen,
|
||||
NSWindowCollectionBehaviorFullScreenAuxiliary);
|
||||
}
|
||||
|
||||
bool NativeWindowMac::IsVisibleOnAllWorkspaces() {
|
||||
|
|
|
@ -1156,8 +1156,7 @@ bool NativeWindowViews::IsMenuBarVisible() {
|
|||
return root_view_->IsMenuBarVisible();
|
||||
}
|
||||
|
||||
void NativeWindowViews::SetVisibleOnAllWorkspaces(bool visible,
|
||||
bool visibleOnFullScreen) {
|
||||
void NativeWindowViews::SetVisibleOnAllWorkspaces(bool visible) {
|
||||
widget()->SetVisibleOnAllWorkspaces(visible);
|
||||
}
|
||||
|
||||
|
|
|
@ -123,8 +123,7 @@ class NativeWindowViews : public NativeWindow,
|
|||
void SetMenuBarVisibility(bool visible) override;
|
||||
bool IsMenuBarVisible() override;
|
||||
|
||||
void SetVisibleOnAllWorkspaces(bool visible,
|
||||
bool visibleOnFullScreen) override;
|
||||
void SetVisibleOnAllWorkspaces(bool visible) override;
|
||||
|
||||
bool IsVisibleOnAllWorkspaces() override;
|
||||
|
||||
|
|
Loading…
Reference in a new issue