diff --git a/widget/windows/nsWindowGfx.cpp b/widget/windows/nsWindowGfx.cpp index 72ff291da957..e3940f90a7e5 100644 --- a/widget/windows/nsWindowGfx.cpp +++ b/widget/windows/nsWindowGfx.cpp @@ -221,8 +221,13 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel) return true; } + PAINTSTRUCT ps; + // Avoid starting the GPU process for the initial navigator:blank window. if (mIsEarlyBlankWindow) { + // Call BeginPaint/EndPaint or Windows will keep sending us messages. + ::BeginPaint(mWnd, &ps); + ::EndPaint(mWnd, &ps); return true; } @@ -233,8 +238,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel) } mLastPaintBounds = mBounds; - PAINTSTRUCT ps; - #ifdef MOZ_XUL if (!aDC && (eTransparencyTransparent == mTransparencyMode)) {