diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 72a0b45281df5..663d97e726c10 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -1627,7 +1627,7 @@ Returns `Boolean` - Whether the menu bar is visible. * `visible` Boolean * `options` Object (optional) * `visibleOnFullScreen` Boolean (optional) _macOS_ - Sets whether - the window should be visible above fullscreen windows + the window should be visible above fullscreen windows _deprecated_ Sets whether the window should be visible on all workspaces. diff --git a/shell/browser/api/atom_api_top_level_window.cc b/shell/browser/api/atom_api_top_level_window.cc index 62d488607428d..05fda82457cb0 100644 --- a/shell/browser/api/atom_api_top_level_window.cc +++ b/shell/browser/api/atom_api_top_level_window.cc @@ -15,6 +15,7 @@ #include "shell/browser/api/atom_api_view.h" #include "shell/browser/api/atom_api_web_contents.h" #include "shell/common/color_util.h" +#include "shell/common/deprecate_util.h" #include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/file_path_converter.h" #include "shell/common/gin_converters/gfx_converter.h" @@ -794,6 +795,13 @@ void TopLevelWindow::SetVisibleOnAllWorkspaces(bool visible, bool visibleOnFullScreen = false; args->GetNext(&options) && options.Get("visibleOnFullScreen", &visibleOnFullScreen); + if (visibleOnFullScreen) { + node::Environment* env = node::Environment::GetCurrent(args->isolate()); + EmitDeprecationWarning( + env, "visibleOnFullScreen is deprecated and will be removed", + "electron"); + } + return window_->SetVisibleOnAllWorkspaces(visible, visibleOnFullScreen); }