creates offscreen window frameless
This commit is contained in:
parent
38681d0a2b
commit
1ef0f6beff
1 changed files with 9 additions and 0 deletions
|
@ -90,6 +90,15 @@ Window::Window(v8::Isolate* isolate, v8::Local<v8::Object> wrapper,
|
||||||
if (options.Get("transparent", &transparent))
|
if (options.Get("transparent", &transparent))
|
||||||
web_preferences.Set("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<mate::Dictionary&>(options);
|
||||||
|
window_options.Set(options::kFrame, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Creates the WebContents used by BrowserWindow.
|
// Creates the WebContents used by BrowserWindow.
|
||||||
web_contents = WebContents::Create(isolate, web_preferences);
|
web_contents = WebContents::Create(isolate, web_preferences);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue