Bug 1145448 - Avoid painting native frame on fullscreen window when activate/inactivate. r=jimm, a=sledru
authorXidorn Quan <quanxunzhen@gmail.com>
Tue, 14 Apr 2015 09:11:09 +1200
changeset 258484 a27fb9b83867
parent 258483 ea342656f3cb
child 258485 4954faa47dd0
push id4678
push userryanvm@gmail.com
push date2015-04-15 13:36 +0000
treeherdermozilla-beta@e487ace8d7f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, sledru
bugs1145448
milestone38.0
Bug 1145448 - Avoid painting native frame on fullscreen window when activate/inactivate. r=jimm, a=sledru
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -4692,17 +4692,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();