From 4c3dfd82d9909321efd070db6e5e4ef5249fe02e Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Fri, 27 Oct 2000 02:41:08 +0000 Subject: [PATCH] If we're being minimized, don't tell Gecko. This allows us to remember the scroll position when we're un-minimized. bug#56156, r=rods/a=hyatt. git-svn-id: svn://10.0.0.236/trunk@81847 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/windows/nsWindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mozilla/widget/src/windows/nsWindow.cpp b/mozilla/widget/src/windows/nsWindow.cpp index 5dfac48f170..a03da0a7d76 100644 --- a/mozilla/widget/src/windows/nsWindow.cpp +++ b/mozilla/widget/src/windows/nsWindow.cpp @@ -3164,6 +3164,14 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT mLastSize.height = newHeight; ///nsRect rect(wp->x, wp->y, wp->cx, wp->cy); + // If we're being minimized, don't send the resize event to Gecko because + // it will cause the scrollbar in the content area to go away and we'll + // forget the scroll position of the page. + if ( !newWidth && !newHeight ) { + result = PR_FALSE; + break; + } + // recalculate the width and height // this time based on the client area if (::GetClientRect(mWnd, &r)) {