mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1454589 - Don't change window style according to sizemode if the window hasn't be shown. r=jimm
MozReview-Commit-ID: Hysc4yXapYW --HG-- extra : rebase_source : 8dfd3684d59895405b9a4d63513ee3ae2fa490ab
This commit is contained in:
parent
bbd97ff8de
commit
44232b9bb8
@ -7562,18 +7562,20 @@ void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode)
|
||||
|
||||
LONG_PTR style = ::GetWindowLongPtrW(hWnd, GWL_STYLE),
|
||||
exStyle = ::GetWindowLongPtr(hWnd, GWL_EXSTYLE);
|
||||
|
||||
if (parent->mIsVisible)
|
||||
style |= WS_VISIBLE;
|
||||
if (parent->mSizeMode == nsSizeMode_Maximized)
|
||||
style |= WS_MAXIMIZE;
|
||||
else if (parent->mSizeMode == nsSizeMode_Minimized)
|
||||
style |= WS_MINIMIZE;
|
||||
|
||||
if (aMode == eTransparencyTransparent)
|
||||
exStyle |= WS_EX_LAYERED;
|
||||
else
|
||||
exStyle &= ~WS_EX_LAYERED;
|
||||
if (parent->mIsVisible) {
|
||||
style |= WS_VISIBLE;
|
||||
if (parent->mSizeMode == nsSizeMode_Maximized) {
|
||||
style |= WS_MAXIMIZE;
|
||||
} else if (parent->mSizeMode == nsSizeMode_Minimized) {
|
||||
style |= WS_MINIMIZE;
|
||||
}
|
||||
}
|
||||
|
||||
if (aMode == eTransparencyTransparent)
|
||||
exStyle |= WS_EX_LAYERED;
|
||||
else
|
||||
exStyle &= ~WS_EX_LAYERED;
|
||||
|
||||
VERIFY_WINDOW_STYLE(style);
|
||||
::SetWindowLongPtrW(hWnd, GWL_STYLE, style);
|
||||
|
Loading…
Reference in New Issue
Block a user