Bug 1145448 - Avoid painting native frame on fullscreen window when activate/inactivate. r=jimm, a=lizzard
authorXidorn Quan <quanxunzhen@gmail.com>
Tue, 14 Apr 2015 09:11:09 +1200
changeset 265593 8c4d11ea4b58681399ae8657ff94b4baef77409c
parent 265592 d8ecc0e6da509b3f8da1ef25b7d4f0aea4ec447a
child 265594 a5578b2096e47710def4c46fdab638c1603ffb48
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, lizzard
bugs1145448
milestone39.0a2
Bug 1145448 - Avoid painting native frame on fullscreen window when activate/inactivate. r=jimm, a=lizzard
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -4684,17 +4684,19 @@ nsWindow::ProcessMessage(UINT msg, WPARA
        * through WM_NCPAINT via InvalidateNonClientRegion.
        */
       UpdateGetWindowInfoCaptionStatus(FALSE != wParam);
 
       if (!mCustomNonClient)
         break;
 
       // let the dwm handle nc painting on glass
-      if(nsUXThemeData::CheckForCompositor())
+      // Never allow native painting if we are on fullscreen
+      if(mSizeMode != nsSizeMode_Fullscreen &&
+         nsUXThemeData::CheckForCompositor())
         break;
 
       if (wParam == TRUE) {
         // going active
         *aRetValue = FALSE; // ignored
         result = true;
         // invalidate to trigger a paint
         InvalidateNonClientRegion();