Bug 1145448 - Avoid painting native frame on fullscreen window when activate/inactivate. r=jimm
authorXidorn Quan <quanxunzhen@gmail.com>
Tue, 14 Apr 2015 09:11:09 +1200
changeset 270301 3a18674a6e42096ad20e8c3f9733e2940c773cc6
parent 270300 e8bd3bf404ff5d0fc62e2957fcdaaad7c085a8d7
child 270302 d0d4d65f2dafac16d25961a2a9645204bc6a5865
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1145448
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1145448 - Avoid painting native frame on fullscreen window when activate/inactivate. r=jimm
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -4681,17 +4681,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();