diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index bfae1aec6fbd..8d69fface9e0 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -6168,6 +6168,10 @@ nsWindow::EndRemoteDrawingInRegion(DrawTarget* aDrawTarget, nsIntRegion& aInvali !mShmImage) return; + if (mThebesSurface) { + aInvalidRegion.AndWith(nsIntRect(nsIntPoint(0, 0), mThebesSurface->GetSize())); + } + gint scale = GdkScaleFactor(); if (scale != 1) { aInvalidRegion.ScaleInverseRoundOut(scale, scale);