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 103293 e048ac9eb279b4140bf6e97812fbabecadf6a576
parent 103292 0363ed04a870419c1e72e871065b2716846ecc2c
child 103294 44f88d64b1166ff8edebaec68b0cdd1ba478477b
push id23343
push userryanvm@gmail.com
push dateSat, 25 Aug 2012 02:53:35 +0000
treeherdermozilla-central@f077de66e52d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmathies
bugs783899
milestone17.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 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.