diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index a4bf1b783c40..70d307137d2e 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -55,6 +55,7 @@ **************************************************************/ #include "gfx2DGlue.h" +#include "gfxEnv.h" #include "gfxPlatform.h" #include "gfxPrefs.h" #include "mozilla/MathAlgorithms.h" @@ -4985,6 +4986,15 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam, if (!mCustomNonClient) break; + // There is a case that rendered result is not kept. Bug 1237617 + if (wParam == TRUE && + !gfxEnv::DisableForcePresent() && + gfxWindowsPlatform::GetPlatform()->DwmCompositionEnabled()) { + nsCOMPtr event = + NS_NewRunnableMethod(this, &nsWindow::ForcePresent); + NS_DispatchToMainThread(event); + } + // let the dwm handle nc painting on glass // Never allow native painting if we are on fullscreen if(mSizeMode != nsSizeMode_Fullscreen &&