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, a=jcristau
authorAhmed (Gentz) El Gendy <zegentzy@gmail.com>
Wed, 26 Oct 2016 16:49:11 -0600
changeset 352774 4f3edfcbc9ba6ec3701699ed1883d4916f2ae3ee
parent 352773 8b0e2637bfd62a497bfc24ad9fb1915f7288d10d
child 352775 26223e11ab14d50ffa60c721ef655ca3b8996016
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, jcristau
bugs1234317
milestone52.0a2
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, a=jcristau MozReview-Commit-ID: FFpH8iZbxXK
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -6255,16 +6255,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;