Skip to content

Commit 40e01ea

Browse files
committed
Combine with whatever aero commit worked this around in
not having this breaks aero in some circumstances
1 parent 5a4f5a4 commit 40e01ea

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
@@ -2881,8 +2881,6 @@ bool nsWindow::UpdateNonClientMargins(bool aReflowWindow) {
28812881
mNonClientOffset = NormalWindowNonClientOffset();
28822882
}
28832883

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

7951-
UpdateOpaqueRegionInternal();
7952-
79537949
if (mCompositorWidgetDelegate) {
79547950
mCompositorWidgetDelegate->UpdateTransparency(aMode);
79557951
}
@@ -7971,40 +7967,6 @@ void nsWindow::SetWindowTranslucencyInner(TransparencyMode aMode) {
79717967
}
79727968
}
79737969

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

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)