@@ -2880,8 +2880,6 @@ bool nsWindow::UpdateNonClientMargins(bool aReflowWindow) {
2880
2880
mNonClientOffset = NormalWindowNonClientOffset ();
2881
2881
}
2882
2882
2883
- UpdateOpaqueRegionInternal ();
2884
-
2885
2883
if (aReflowWindow) {
2886
2884
// Force a reflow of content based on the new client
2887
2885
// dimensions.
@@ -7947,8 +7945,6 @@ void nsWindow::SetWindowTranslucencyInner(TransparencyMode aMode) {
7947
7945
if (HasGlass ()) memset (&mGlassMargins , 0 , sizeof mGlassMargins );
7948
7946
mTransparencyMode = aMode;
7949
7947
7950
- UpdateOpaqueRegionInternal ();
7951
-
7952
7948
if (mCompositorWidgetDelegate ) {
7953
7949
mCompositorWidgetDelegate ->UpdateTransparency (aMode);
7954
7950
}
@@ -7970,40 +7966,6 @@ void nsWindow::SetWindowTranslucencyInner(TransparencyMode aMode) {
7970
7966
}
7971
7967
}
7972
7968
7973
- void nsWindow::UpdateOpaqueRegion (const LayoutDeviceIntRegion& aRegion) {
7974
- if (aRegion == mOpaqueRegion ) {
7975
- return ;
7976
- }
7977
- mOpaqueRegion = aRegion;
7978
- UpdateOpaqueRegionInternal ();
7979
- }
7980
-
7981
- void nsWindow::UpdateOpaqueRegionInternal () {
7982
- MARGINS margins{0 };
7983
- if (mTransparencyMode == TransparencyMode::Transparent) {
7984
- // If there is no opaque region, set margins to support a full sheet of
7985
- // glass. Comments in MSDN indicate all values must be set to -1 to get a
7986
- // full sheet of glass.
7987
- margins = {-1 , -1 , -1 , -1 };
7988
- if (!mOpaqueRegion .IsEmpty ()) {
7989
- LayoutDeviceIntRect clientBounds = GetClientBounds ();
7990
- // Find the largest rectangle and use that to calculate the inset.
7991
- LayoutDeviceIntRect largest = mOpaqueRegion .GetLargestRectangle ();
7992
- margins.cxLeftWidth = largest.X ();
7993
- margins.cxRightWidth = clientBounds.Width () - largest.XMost ();
7994
- margins.cyBottomHeight = clientBounds.Height () - largest.YMost ();
7995
- margins.cyTopHeight = largest.Y ();
7996
-
7997
- auto ncmargin = NonClientSizeMargin ();
7998
- margins.cxLeftWidth += ncmargin.left ;
7999
- margins.cyTopHeight += ncmargin.top ;
8000
- margins.cxRightWidth += ncmargin.right ;
8001
- margins.cyBottomHeight += ncmargin.bottom ;
8002
- }
8003
- }
8004
- DwmExtendFrameIntoClientArea (mWnd , &margins);
8005
- }
8006
-
8007
7969
/* *************************************************************
8008
7970
**************************************************************
8009
7971
**
0 commit comments