Skip to content

Commit e8f6670

Browse files
committed
Combine with whatever aero commit worked this around in
not having this breaks aero in some circumstances
1 parent c319a01 commit e8f6670

File tree

2 files changed

+0
-43
lines changed

2 files changed

+0
-43
lines changed

widget/windows/nsWindow.cpp

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2880,8 +2880,6 @@ bool nsWindow::UpdateNonClientMargins(bool aReflowWindow) {
28802880
mNonClientOffset = NormalWindowNonClientOffset();
28812881
}
28822882

2883-
UpdateOpaqueRegionInternal();
2884-
28852883
if (aReflowWindow) {
28862884
// Force a reflow of content based on the new client
28872885
// dimensions.
@@ -7947,8 +7945,6 @@ void nsWindow::SetWindowTranslucencyInner(TransparencyMode aMode) {
79477945
if (HasGlass()) memset(&mGlassMargins, 0, sizeof mGlassMargins);
79487946
mTransparencyMode = aMode;
79497947

7950-
UpdateOpaqueRegionInternal();
7951-
79527948
if (mCompositorWidgetDelegate) {
79537949
mCompositorWidgetDelegate->UpdateTransparency(aMode);
79547950
}
@@ -7970,40 +7966,6 @@ void nsWindow::SetWindowTranslucencyInner(TransparencyMode aMode) {
79707966
}
79717967
}
79727968

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-
80077969
/**************************************************************
80087970
**************************************************************
80097971
**

widget/windows/nsWindow.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,6 @@ class nsWindow final : public nsBaseWidget {
648648
bool IsSimulatedClientArea(int32_t clientX, int32_t clientY);
649649
bool IsWindowButton(int32_t hitTestResult);
650650

651-
void UpdateOpaqueRegion(const LayoutDeviceIntRegion&) override;
652-
void UpdateOpaqueRegionInternal();
653-
654651
bool DispatchTouchEventFromWMPointer(UINT msg, LPARAM aLParam,
655652
const WinPointerInfo& aPointerInfo,
656653
mozilla::MouseButton aButton);
@@ -844,8 +841,6 @@ class nsWindow final : public nsBaseWidget {
844841

845842
// Draggable titlebar region maintained by UpdateWindowDraggingRegion
846843
LayoutDeviceIntRegion mDraggableRegion;
847-
// Opaque region maintained by UpdateOpaqueRegion
848-
LayoutDeviceIntRegion mOpaqueRegion;
849844

850845
// Graphics
851846
LayoutDeviceIntRect mLastPaintBounds;

0 commit comments

Comments
 (0)