diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 3358f1085..985bc563c 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -90,6 +90,15 @@ Window::Window(v8::Isolate* isolate, v8::Local wrapper, if (options.Get("transparent", &transparent)) web_preferences.Set("transparent", transparent); + // Offscreen windows are always created frameless. + bool offscreen; + if (web_preferences.Get("offscreen", &offscreen)) { + if (offscreen) { + auto window_options = const_cast(options); + window_options.Set(options::kFrame, false); + } + } + // Creates the WebContents used by BrowserWindow. web_contents = WebContents::Create(isolate, web_preferences); }