diff --git a/widget/src/windows/nsWindowGfx.cpp b/widget/src/windows/nsWindowGfx.cpp index b03dbe159638..ac4f8fd3d3af 100644 --- a/widget/src/windows/nsWindowGfx.cpp +++ b/widget/src/windows/nsWindowGfx.cpp @@ -253,11 +253,7 @@ nsIntRegion nsWindow::GetRegionToPaint(PRBool aForceFullRepaint, if (aForceFullRepaint) { RECT paintRect; ::GetClientRect(mWnd, &paintRect); - nsIntRegion region(nsWindowGfx::ToIntRect(paintRect)); -#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN - region.Sub(region, mCaptionButtonsRoundedRegion); -#endif - return region; + return nsIntRegion(nsWindowGfx::ToIntRect(paintRect)); } #if defined(WINCE_WINDOWS_MOBILE) || !defined(WINCE) @@ -277,21 +273,11 @@ nsIntRegion nsWindow::GetRegionToPaint(PRBool aForceFullRepaint, ::DeleteObject(paintRgn); # ifdef WINCE if (!rgn.IsEmpty()) - return rgn; -# elif MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN - rgn.Sub(rgn, mCaptionButtonsRoundedRegion); - return rgn; -# else - return rgn; # endif + return rgn; } #endif - - nsIntRegion region(nsWindowGfx::ToIntRect(ps.rcPaint)); -#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN - region.Sub(region, mCaptionButtonsRoundedRegion); -#endif - return region; + return nsIntRegion(nsWindowGfx::ToIntRect(ps.rcPaint)); } #define WORDSSIZE(x) ((x).width * (x).height) @@ -578,28 +564,6 @@ DDRAW_FAILED: #endif } -#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN - if (IsRenderMode(gfxWindowsPlatform::RENDER_GDI) && - mTransparencyMode != eTransparencyTransparent && - !mCaptionButtons.IsEmpty()) { - // The area behind the caption buttons need to have a - // black background first to make the clipping work. - RECT rect; - rect.top = mCaptionButtons.y; - rect.left = mCaptionButtons.x; - rect.right = mCaptionButtons.x + mCaptionButtons.width; - rect.bottom = mCaptionButtons.y + mCaptionButtons.height; - FillRect(hDC, &rect, (HBRUSH)GetStockObject(BLACK_BRUSH)); - - const nsIntRect* r; - for (nsIntRegionRectIterator iter(event.region); - (r = iter.Next()) != nsnull;) { - thebesContext->Rectangle(gfxRect(r->x, r->y, r->width, r->height), PR_TRUE); - } - thebesContext->Clip(); - } -#endif - { AutoLayerManagerSetup setupLayerManager(this, thebesContext, doubleBuffering); @@ -785,23 +749,6 @@ DDRAW_FAILED: } } -#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN - if(event.region.Intersects(mCaptionButtons)) { - // Temporary workaround to make the captions buttons visible for D3D9 - const nsIntRect* r; - RECT rect; - HBRUSH blackBrush = (HBRUSH)GetStockObject(BLACK_BRUSH); - for (nsIntRegionRectIterator iter(mCaptionButtonsRoundedRegion); - (r = iter.Next()) != nsnull;) { - rect.top = r->y; - rect.left = r->x; - rect.right = r->XMost(); - rect.bottom = r->YMost(); - FillRect(hDC, &rect, blackBrush); - } - } -#endif - if (!aDC) { ::EndPaint(mWnd, &ps); }