Bug 783899, notify the view for resize events before the webshellwindow, fixing thunderbird window size when maximized, r=jmathies
authorNeil Deakin <neil@mozilla.com>
Fri, 24 Aug 2012 08:42:15 -0400
changeset 105326 e048ac9eb279b4140bf6e97812fbabecadf6a576
parent 105325 0363ed04a870419c1e72e871065b2716846ecc2c
child 105327 44f88d64b1166ff8edebaec68b0cdd1ba478477b
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersjmathies
bugs783899
milestone17.0a1
Bug 783899, notify the view for resize events before the webshellwindow, fixing thunderbird window size when maximized, r=jmathies
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -7077,23 +7077,25 @@ bool nsWindow::OnResize(nsIntRect &aWind
 {
 #ifdef CAIRO_HAS_D2D_SURFACE
   if (mD2DWindowSurface) {
     mD2DWindowSurface = NULL;
     Invalidate();
   }
 #endif
 
+  bool result = mWidgetListener ?
+                mWidgetListener->WindowResized(this, aWindowRect.width, aWindowRect.height) : false;
+
   // If there is an attached view, inform it as well as the normal widget listener.
   if (mAttachedWidgetListener) {
-    mAttachedWidgetListener->WindowResized(this, aWindowRect.width, aWindowRect.height);
-  }
-
-  return mWidgetListener ?
-         mWidgetListener->WindowResized(this, aWindowRect.width, aWindowRect.height) : false;
+    return mAttachedWidgetListener->WindowResized(this, aWindowRect.width, aWindowRect.height);
+  }
+
+  return result;
 }
 
 bool nsWindow::OnHotKey(WPARAM wParam, LPARAM lParam)
 {
   return true;
 }
 
 // Can be overriden. Controls auto-erase of background.