JRE-573 [windows] window client area bounds mismatch

Apply only WmEraseBkgnd

(cherry picked from commit afa68f7ad6440303c6417be3f675b1c4644b6014)

(cherry picked from commit 0651b45e13)
This commit is contained in:
Anton Tarasov
2017-11-10 20:23:13 +03:00
committed by alexey.ushakov@jetbrains.com
parent 16b4bbccdd
commit 6a399819cb
2 changed files with 15 additions and 0 deletions

View File

@@ -1835,6 +1835,20 @@ void AwtWindow::WmDPIChanged(const LPARAM &lParam) {
CheckIfOnNewScreen(true);
}
MsgRouting AwtWindow::WmEraseBkgnd(HDC hDC, BOOL& didErase)
{
if (!IsUndecorated()) {
// [tav] When an undecorated window is shown nothing is actually displayed
// until something is drawn in it. In order to prevent blinking, the background
// is not erased for such windows.
RECT rc;
::GetClipBox(hDC, &rc);
::FillRect(hDC, &rc, this->GetBackgroundBrush());
}
didErase = TRUE;
return mrConsume;
}
/*
* Override AwtComponent's move handling to first update the
* java AWT target's position fields directly, since Windows

View File

@@ -168,6 +168,7 @@ public:
virtual MsgRouting WmClose();
virtual MsgRouting WmDestroy();
virtual MsgRouting WmShowWindow(BOOL show, UINT status);
virtual MsgRouting WmEraseBkgnd(HDC hDC, BOOL& didErase);
virtual MsgRouting WmGetMinMaxInfo(LPMINMAXINFO lpmmi);
virtual MsgRouting WmMove(int x, int y);
virtual MsgRouting WmSize(UINT type, int w, int h);