Bug 1237617 - Call nsWindow::ForcePresent during going active r=bas.schouten

This commit is contained in:
Sotaro Ikeda 2016-04-26 01:06:42 -07:00
Родитель c4ec1107e4
Коммит 202f82bb78
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -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<nsIRunnable> 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 &&