From 8b2bffcf9ed5bff406eeec9a36076474bbdd4a32 Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Mon, 21 May 2018 02:56:45 +0200 Subject: [PATCH] Only expand maximum size constraint if there was a constraint originally (#13003) --- 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 528e47dbb8c3..71e4d3164a5a 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -288,7 +288,9 @@ gfx::Size NativeWindow::GetContentMinimumSize() const { gfx::Size NativeWindow::GetContentMaximumSize() const { gfx::Size maximum_size = GetContentSizeConstraints().GetMaximumSize(); #if defined(OS_WIN) - return GetExpandedWindowSize(this, maximum_size); + return GetContentSizeConstraints().HasMaximumSize() + ? GetExpandedWindowSize(this, maximum_size) + : maximum_size; #else return maximum_size; #endif