Bug 907926 - Use the ClientArea when initializing the draw target in nsWindowGfx. r=Bas

This commit is contained in:
Matt Woodrow 2013-09-11 17:08:53 +12:00
parent 5c0ccaac57
commit a62154253e

View File

@ -367,10 +367,12 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
nsRefPtr<gfxContext> thebesContext;
if (gfxPlatform::GetPlatform()->SupportsAzureContentForType(mozilla::gfx::BACKEND_CAIRO)) {
RECT paintRect;
::GetClientRect(mWnd, &paintRect);
RefPtr<mozilla::gfx::DrawTarget> dt =
gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(targetSurface,
mozilla::gfx::IntSize(targetSurface->GetSize().width,
targetSurface->GetSize().height));
mozilla::gfx::IntSize(paintRect.right - paintRect.left,
paintRect.bottom - paintRect.top));
thebesContext = new gfxContext(dt);
} else {
thebesContext = new gfxContext(targetSurface);