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=rkent THUNDERBIRD_45_VERBRANCH
authorAhmed (Gentz) El Gendy <zegentzy@gmail.com>
Wed, 26 Oct 2016 16:49:11 -0600
branchTHUNDERBIRD_45_VERBRANCH
changeset 312617 eb6f18dbfe8db1093d52590efa19f9d1bebef7dd
parent 312616 83ee87b301bd952e4fef2de8189062ea0b19276a
child 312618 f4594be578ff95a8cba652d1cf82d9e430d8c58b
child 312651 7a250fa63250aae9b70cf916ae282d86ffe9418f
child 312745 e9e229c7a377a209f7a852ff39e35eb7af0f7d9f
push id399
push userkent@caspia.com
push dateMon, 23 Jan 2017 21:58:42 +0000
treeherdermozilla-esr45@eb6f18dbfe8d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, rkent
bugs1234317
milestone45.7.0
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=rkent MozReview-Commit-ID: FFpH8iZbxXK
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -6152,16 +6152,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;