From f6b5ff74f3cb97495fa437700e89392fb5fd0882 Mon Sep 17 00:00:00 2001 From: "dcone%netscape.com" Date: Fri, 3 Dec 1999 15:55:37 +0000 Subject: [PATCH] Fixed and invalidate in showwindow. r=sfraser,rods. Bug=18971 (pdt+) --- widget/src/mac/nsMacWindow.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/widget/src/mac/nsMacWindow.cpp b/widget/src/mac/nsMacWindow.cpp index 527970a4032e..4c4739699488 100644 --- a/widget/src/mac/nsMacWindow.cpp +++ b/widget/src/mac/nsMacWindow.cpp @@ -542,8 +542,21 @@ NS_IMETHODIMP nsMacWindow::Show(PRBool bState) { if ( mAcceptsActivation ) { + Rect windowrect; + Point topleft,botright; + ::ShowWindow(mWindowPtr); ::SelectWindow(mWindowPtr); + windowrect = (**((WindowPeek)mWindowPtr)->contRgn).rgnBBox; + + // on some windows (with pop ups) the ::ShowWindow will not invalidate the parent + // properly + topleft = topLeft(windowrect); + GlobalToLocal(&topleft); + botright = botRight(windowrect); + GlobalToLocal(&botright); + SetRect(&windowrect,topleft.h,topleft.v,botright.h,botright.v); + ::InvalRect(&windowrect); } else {