зеркало из https://github.com/mozilla/pjs.git
Backed out changeset e05e892261a8 (bug 444005) because it caused bug 445838.
This commit is contained in:
Родитель
2d34aea554
Коммит
f3f7bdea17
|
@ -617,21 +617,6 @@ void nsWindow::GlobalMsgWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
|
|||
|
||||
// End of the methods to dispatch global messages
|
||||
|
||||
#ifndef WM_DWMCOMPOSITIONCHANGED
|
||||
#define WM_DWMCOMPOSITIONCHANGED 0x031E
|
||||
#endif
|
||||
|
||||
// DWM function prototypes
|
||||
typedef HRESULT (WINAPI*DwmIsCompositionEnabledProc)(BOOL *pfEnabled);
|
||||
static DwmIsCompositionEnabledProc dwmIsCompositionEnabledPtr = NULL;
|
||||
static PRBool checkedDWM = PR_FALSE;
|
||||
static PRBool IsGlassEnabled() {
|
||||
BOOL compositionIsEnabled = FALSE;
|
||||
if(dwmIsCompositionEnabledPtr)
|
||||
dwmIsCompositionEnabledPtr(&compositionIsEnabled);
|
||||
return compositionIsEnabled ? PR_TRUE : PR_FALSE;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// nsWindow constructor
|
||||
|
@ -701,15 +686,6 @@ nsWindow::nsWindow() : nsBaseWidget()
|
|||
mIsTopWidgetWindow = PR_FALSE;
|
||||
mLastKeyboardLayout = 0;
|
||||
|
||||
if(!checkedDWM) {
|
||||
HMODULE hDWM = ::LoadLibrary("dwmapi.dll");
|
||||
checkedDWM = PR_TRUE;
|
||||
if(hDWM) {
|
||||
dwmIsCompositionEnabledPtr = (DwmIsCompositionEnabledProc)::GetProcAddress(hDWM, "DwmIsCompositionEnabled");
|
||||
}
|
||||
}
|
||||
mHasAeroGlass = ::IsGlassEnabled();
|
||||
|
||||
#ifndef WINCE
|
||||
if (!sInstanceCount && SUCCEEDED(::OleInitialize(NULL))) {
|
||||
sIsOleInitialized = TRUE;
|
||||
|
@ -5288,9 +5264,6 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
|
|||
|
||||
}
|
||||
break;
|
||||
case WM_DWMCOMPOSITIONCHANGED:
|
||||
mHasAeroGlass = ::IsGlassEnabled();
|
||||
break;
|
||||
}
|
||||
|
||||
//*aRetValue = result;
|
||||
|
@ -5776,8 +5749,6 @@ PRBool nsWindow::OnPaint(HDC aDC)
|
|||
}
|
||||
}
|
||||
|
||||
PRBool haveCompositor = GetTopLevelWindow()->mHasAeroGlass;
|
||||
|
||||
nsCOMPtr<nsIRegion> paintRgnWin;
|
||||
if (paintRgn) {
|
||||
paintRgnWin = ConvertHRGNToRegion(paintRgn);
|
||||
|
@ -5826,8 +5797,7 @@ PRBool nsWindow::OnPaint(HDC aDC)
|
|||
thebesContext->SetOperator(gfxContext::OPERATOR_CLEAR);
|
||||
thebesContext->Paint();
|
||||
thebesContext->SetOperator(gfxContext::OPERATOR_OVER);
|
||||
} else if (!haveCompositor) {
|
||||
// If the Vista compositor is on, then we don't need to double buffer
|
||||
} else {
|
||||
// If we're not doing translucency, then double buffer
|
||||
thebesContext->PushGroup(gfxASurface::CONTENT_COLOR);
|
||||
}
|
||||
|
@ -5856,7 +5826,7 @@ PRBool nsWindow::OnPaint(HDC aDC)
|
|||
// bitmap. Now it can be read from memory bitmap to apply alpha channel and after
|
||||
// that displayed on the screen.
|
||||
UpdateTranslucentWindow();
|
||||
} else if (result && !haveCompositor) {
|
||||
} else if (result) {
|
||||
// Only update if DispatchWindowEvent returned TRUE; otherwise, nothing handled
|
||||
// this, and we'll just end up painting with black.
|
||||
thebesContext->PopGroupToSource();
|
||||
|
|
Загрузка…
Ссылка в новой задаче