mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 768400 - clear win32 transparent windows when hidden so stale content isn't briefly displayed when they are reshown. r=roc
This commit is contained in:
parent
49fd13eb7d
commit
5af245a56b
@ -1155,6 +1155,11 @@ NS_METHOD nsWindow::Show(bool bState)
|
||||
::SendMessageW(mWnd, WM_CHANGEUISTATE, MAKEWPARAM(UIS_INITIALIZE, UISF_HIDEFOCUS | UISF_HIDEACCEL), 0);
|
||||
}
|
||||
} else {
|
||||
// Clear contents to avoid ghosting of old content if we display
|
||||
// this window again.
|
||||
if (wasVisible && mTransparencyMode == eTransparencyTransparent) {
|
||||
ClearTranslucentWindow();
|
||||
}
|
||||
if (mWindowType != eWindowType_dialog) {
|
||||
::ShowWindow(mWnd, SW_HIDE);
|
||||
} else {
|
||||
@ -7454,6 +7459,16 @@ void nsWindow::SetupTranslucentWindowMemoryBitmap(nsTransparencyMode aMode)
|
||||
}
|
||||
}
|
||||
|
||||
void nsWindow::ClearTranslucentWindow()
|
||||
{
|
||||
if (mTransparentSurface) {
|
||||
nsRefPtr<gfxContext> thebesContext = new gfxContext(mTransparentSurface);
|
||||
thebesContext->SetOperator(gfxContext::OPERATOR_CLEAR);
|
||||
thebesContext->Paint();
|
||||
UpdateTranslucentWindow();
|
||||
}
|
||||
}
|
||||
|
||||
nsresult nsWindow::UpdateTranslucentWindow()
|
||||
{
|
||||
if (mBounds.IsEmpty())
|
||||
|
@ -431,6 +431,7 @@ private:
|
||||
nsTransparencyMode GetWindowTranslucencyInner() const { return mTransparencyMode; }
|
||||
void ResizeTranslucentWindow(PRInt32 aNewWidth, PRInt32 aNewHeight, bool force = false);
|
||||
nsresult UpdateTranslucentWindow();
|
||||
void ClearTranslucentWindow();
|
||||
void SetupTranslucentWindowMemoryBitmap(nsTransparencyMode aMode);
|
||||
void UpdateGlass();
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user