Bug 1356575 - Don't warn on SetTransparencyMode on Windows if the mode isn't actually changing. r=jimm a=gchang
authorMike Conley <mconley@mozilla.com>
Tue, 18 Apr 2017 14:35:38 -0400
changeset 395976 713a6c2a6b15fad388e8a291709879ca56646be6
parent 395975 3f2155a90b02fb6e7434e3283845a42fdaaff11d
child 395977 89318a1e562bca3d9c17987335f66f4c260cd6cd
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, gchang
bugs1356575
milestone54.0
Bug 1356575 - Don't warn on SetTransparencyMode on Windows if the mode isn't actually changing. r=jimm a=gchang MozReview-Commit-ID: J7dV0xKuEL7
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -3039,16 +3039,17 @@ void nsWindow::SetTransparencyMode(nsTra
   nsWindow* window = GetTopLevelWindow(true);
   MOZ_ASSERT(window);
 
   if (!window || window->DestroyCalled()) {
       return;
   }
 
   if (nsWindowType::eWindowType_toplevel == window->mWindowType &&
+      mTransparencyMode != aMode &&
       !nsUXThemeData::CheckForCompositor()) {
       NS_WARNING("Cannot set transparency mode on top-level windows.");
       return;
   }
 
   window->SetWindowTranslucencyInner(aMode);
 }