Bug 886988 - Reset the nsChildView layer manager when we change the transparency mode. r=roc

This commit is contained in:
David Anderson 2013-07-03 16:35:50 -04:00
parent 6f65f0f63f
commit c1f7b92b42
2 changed files with 7 additions and 1 deletions

View File

@ -496,7 +496,7 @@ public:
NS_IMETHOD StartComplexTextInputForCurrentEvent();
virtual nsTransparencyMode GetTransparencyMode();
virtual void SetTransparencyMode(nsTransparencyMode aMode);
virtual void SetTransparencyMode(nsTransparencyMode aMode);
virtual nsresult SynthesizeNativeKeyEvent(int32_t aNativeKeyboardLayout,
int32_t aNativeKeyCode,

View File

@ -559,7 +559,13 @@ void nsChildView::SetTransparencyMode(nsTransparencyMode aMode)
nsCocoaWindow* windowWidget = GetXULWindowWidget();
if (windowWidget) {
nsTransparencyMode old = windowWidget->GetTransparencyMode();
windowWidget->SetTransparencyMode(aMode);
if (windowWidget->GetTransparencyMode() != old) {
// Our layer manager depends on the transparency, so recreate it if the
// transparency changes.
mLayerManager = nullptr;
}
}
NS_OBJC_END_TRY_ABORT_BLOCK;