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