Bug 1234317 - Update mLastSizeMode when window size mode changes within Windows widget, avoids a window focus problem on Windows 10 with theme changes. r=jimm
authorAhmed (Gentz) El Gendy <zegentzy@gmail.com>
Wed, 26 Oct 2016 16:49:11 -0600
changeset 323065 2778571f6f34c4c13d1ff5f1e5ebef4875092894
parent 323064 25b0168c9cc78b7fca048c1b1240926659f98033
child 323066 a7cb56d86cb73a56ffba2b819266dc1fd5a3852c
push id30967
push userphilringnalda@gmail.com
push dateFri, 18 Nov 2016 03:21:38 +0000
treeherdermozilla-central@8e476f8bd52d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1234317
milestone53.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 1234317 - Update mLastSizeMode when window size mode changes within Windows widget, avoids a window focus problem on Windows 10 with theme changes. r=jimm MozReview-Commit-ID: FFpH8iZbxXK
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -6257,16 +6257,18 @@ void nsWindow::OnWindowPosChanged(WINDOW
       mWidgetListener->SizeModeChanged(mSizeMode);
 
     // If window was restored, window activation was bypassed during the 
     // SetSizeMode call originating from OnWindowPosChanging to avoid saving
     // pre-restore attributes. Force activation now to get correct attributes.
     if (mLastSizeMode != nsSizeMode_Normal && mSizeMode == nsSizeMode_Normal)
       DispatchFocusToTopLevelWindow(true);
 
+    mLastSizeMode = mSizeMode;
+
     // Skip window size change events below on minimization.
     if (mSizeMode == nsSizeMode_Minimized)
       return;
   }
 
   // Handle window position changes
   if (!(wp->flags & SWP_NOMOVE)) {
     mBounds.x = wp->x;