From 5681ee522091907bb85b283dd5ecac6e37408242 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 4 Aug 2016 11:41:32 -0700 Subject: [PATCH] Use current content position when adjusting content size --- atom/browser/native_window.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index e345c6ecb2..86a402b766 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -219,7 +219,9 @@ gfx::Point NativeWindow::GetPosition() { } void NativeWindow::SetContentSize(const gfx::Size& size, bool animate) { - SetSize(ContentBoundsToWindowBounds(gfx::Rect(size)).size(), animate); + gfx::Rect bounds = GetContentBounds(); + bounds.set_size(size); + SetSize(ContentBoundsToWindowBounds(bounds).size(), animate); } gfx::Size NativeWindow::GetContentSize() {