Browse Source

Only expand maximum size constraint if there was a constraint originally (#13003)

Heilig Benedek 7 years ago
parent
commit
8b2bffcf9e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      atom/browser/native_window.cc

+ 3 - 1
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