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

Fix BrowserView auto-resize and BrowserWindow resize event on Windows #10052

merged 2 commits into from Sep 25, 2017


None yet
4 participants

poiru commented Jul 17, 2017

Please see individual commits for description.

@poiru poiru requested a review from kevinsawicki Jul 17, 2017

const auto new_bounds = GetBounds();
if (widget_size_ != new_bounds.size()) {
if (browser_view_) {
const auto flags = static_cast<NativeBrowserViewViews*>(browser_view_)

This comment has been minimized.


kevinsawicki Jul 19, 2017


This change looks good to me, just wondering if maybe the code inside this if (browser_view_) block should be moved into a helper method in NativeBrowserViewViews instead of living in, something like NativeBrowserViewViews::OnParentWidgetBoundsChanged that just passes in the new_bounds as a param.

@jkleinsc jkleinsc self-requested a review Aug 7, 2017


@poiru can apply the changes @kevinsawicki suggested?

poiru added some commits Jul 17, 2017

Make BrowserView auto-resize relative to window size on Windows/Linux
Previously it was relative to the window web contents size, which was
not consistent with macOS.
Stop sending resize event for minimized windows on Windows
This makes it consistent with macOS.

This also fixes BrowserView auto-resize on Windows when minimizing and
restoring the window. Previously it would incorrectly grow too in some

zcbenz approved these changes Sep 25, 2017

@zcbenz zcbenz merged commit aeb568b into master Sep 25, 2017

6 of 8 checks passed

continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
continuous-integration/travis-ci/pr The Travis CI build is in progress
ci/circleci: electron-linux-arm Your tests passed on CircleCI!
ci/circleci: electron-linux-arm64 Your tests passed on CircleCI!
ci/circleci: electron-linux-ia32 Your tests passed on CircleCI!
ci/circleci: electron-linux-x64 Your tests passed on CircleCI!
electron-mas-x64 Build #5188 succeeded in 12 min
electron-osx-x64 Build #5172 succeeded in 12 min

@zcbenz zcbenz deleted the views-browserview-bounds branch Sep 25, 2017

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