Bug 1535437 - Part 1: Allow windows to resize outside of aspect ratio locking on Windows r=jmathies
☠☠ backed out by 96b4cb315770 ☠ ☠
authorMark Striemer <mstriemer@mozilla.com>
Thu, 14 Nov 2019 00:24:11 +0000
changeset 501998 46b4eb05f2ae0122e9f7e3711d2470e47ef54e15
parent 501997 0213f7cd22c42d87a1222719004db5cd574eae67
child 501999 bc637c20c7d4c06835d3269e9a3558feacb6c28e
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmathies
bugs1535437
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1535437 - Part 1: Allow windows to resize outside of aspect ratio locking on Windows r=jmathies Differential Revision: https://phabricator.services.mozilla.com/D51940
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -1840,18 +1840,20 @@ void nsWindow::Resize(double aWidth, dou
     UINT flags = SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOMOVE;
 
     if (!aRepaint) {
       flags |= SWP_NOREDRAW;
     }
 
     ClearThemeRegion();
     double oldScale = mDefaultScale;
+    mResizeState = RESIZING;
     VERIFY(
         ::SetWindowPos(mWnd, nullptr, 0, 0, width, GetHeight(height), flags));
+    mResizeState = NOT_RESIZING;
     if (WinUtils::LogToPhysFactor(mWnd) != oldScale) {
       ChangedDPI();
     }
     SetThemeRegion();
   }
 
   if (aRepaint) Invalidate();
 
@@ -1889,18 +1891,20 @@ void nsWindow::Resize(double aX, double 
   if (mWnd) {
     UINT flags = SWP_NOZORDER | SWP_NOACTIVATE;
     if (!aRepaint) {
       flags |= SWP_NOREDRAW;
     }
 
     ClearThemeRegion();
     double oldScale = mDefaultScale;
+    mResizeState = RESIZING;
     VERIFY(
         ::SetWindowPos(mWnd, nullptr, x, y, width, GetHeight(height), flags));
+    mResizeState = NOT_RESIZING;
     if (WinUtils::LogToPhysFactor(mWnd) != oldScale) {
       ChangedDPI();
     }
     if (mTransitionWnd) {
       // If we have a fullscreen transition window, we need to make
       // it topmost again, otherwise the taskbar may be raised by
       // the system unexpectedly when we leave fullscreen state.
       ::SetWindowPos(mTransitionWnd, HWND_TOPMOST, 0, 0, 0, 0,