From 670be3a9fac3f670b330fe6bba2fa91887613dca Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Mon, 29 Feb 2016 13:09:04 +0000 Subject: [PATCH] Bug 1246389 - Resize window appropriately on WM_DPICHANGED messages for dynamic resolution changes. r=emk --- widget/windows/nsWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index f5cb89aa772..f42225773e5 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -6881,7 +6881,8 @@ nsWindow::OnDPIChanged(int32_t x, int32_t y, int32_t width, int32_t height) double oldScale = mDefaultScale; mDefaultScale = -1.0; // force recomputation of scale factor double newScale = GetDefaultScaleInternal(); - if (mResizeState != NOT_RESIZING) { + + if (mResizeState != RESIZING) { // We want to try and maintain the size of the client area, rather than // the overall size of the window including non-client area, so we prefer // to calculate the new size instead of using Windows' suggested values.