New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always create offscreen window frameless #8250

Merged
merged 3 commits into from Dec 29, 2016

Conversation

Projects
None yet
3 participants
@gerhardberger
Member

gerhardberger commented Dec 20, 2016

This PR creates the browser window in offscreen mode always without a frame, since in offscreen mode the frame is not accessible, so this way, the window size will be consistent. #8224

@Mr0grog

This comment has been minimized.

Show comment
Hide comment
@Mr0grog

Mr0grog Dec 21, 2016

Contributor

Should this also document that all offscreen windows are frameless in the BrowserWindow constructor doc and the offscreen guide?

Contributor

Mr0grog commented Dec 21, 2016

Should this also document that all offscreen windows are frameless in the BrowserWindow constructor doc and the offscreen guide?

Show outdated Hide outdated atom/browser/api/atom_api_window.cc
@@ -90,6 +90,15 @@ Window::Window(v8::Isolate* isolate, v8::Local<v8::Object> 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)) {

This comment has been minimized.

@kevinsawicki

kevinsawicki Dec 21, 2016

Contributor

This line could just be:

if (web_preferences.Get("offscreen", &offscreen) && offscreen) {

This style is used in atom/browser/web_contents_preferences.cc

@kevinsawicki

kevinsawicki Dec 21, 2016

Contributor

This line could just be:

if (web_preferences.Get("offscreen", &offscreen) && offscreen) {

This style is used in atom/browser/web_contents_preferences.cc

@gerhardberger

This comment has been minimized.

Show comment
Hide comment
@gerhardberger

gerhardberger Dec 21, 2016

Member

@kevinsawicki thanks, I changed it!

Also added a note to the tutorial that the window is frameless in offscreen mode.

Member

gerhardberger commented Dec 21, 2016

@kevinsawicki thanks, I changed it!

Also added a note to the tutorial that the window is frameless in offscreen mode.

@kevinsawicki kevinsawicki merged commit 6ea1bac into electron:master Dec 29, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki Dec 29, 2016

Contributor

Thanks for this @gerhardberger 👍 🚢

Contributor

kevinsawicki commented Dec 29, 2016

Thanks for this @gerhardberger 👍 🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment