mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 590368. Pass SWP_NOCOPYBITS when moving a clipped plugin window with D3D9, to work around a Windows/driver bug. r=jmathies a=blocking
This commit is contained in:
parent
d73fe8b3c6
commit
9575e3b7b5
@ -233,6 +233,7 @@
|
||||
#include "nsIXULRuntime.h"
|
||||
|
||||
using namespace mozilla::widget;
|
||||
using namespace mozilla::layers;
|
||||
|
||||
/**************************************************************
|
||||
**************************************************************
|
||||
@ -1392,8 +1393,19 @@ NS_METHOD nsWindow::Move(PRInt32 aX, PRInt32 aY)
|
||||
}
|
||||
#endif
|
||||
ClearThemeRegion();
|
||||
VERIFY(::SetWindowPos(mWnd, NULL, aX, aY, 0, 0,
|
||||
SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE));
|
||||
|
||||
UINT flags = SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE;
|
||||
// Workaround SetWindowPos bug with D3D9. If our window has a clip
|
||||
// region, some drivers or OSes may incorrectly copy into the clipped-out
|
||||
// area.
|
||||
if (mWindowType == eWindowType_plugin &&
|
||||
(!mLayerManager || mLayerManager->GetBackendType() == LayerManager::LAYERS_D3D9) &&
|
||||
mClipRects &&
|
||||
(mClipRectCount != 1 || mClipRects[0] != nsIntRect(0, 0, mBounds.width, mBounds.height))) {
|
||||
flags |= SWP_NOCOPYBITS;
|
||||
}
|
||||
VERIFY(::SetWindowPos(mWnd, NULL, aX, aY, 0, 0, flags));
|
||||
|
||||
SetThemeRegion();
|
||||
}
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user