mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
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:
committed by
alexey.ushakov@jetbrains.com
parent
16b4bbccdd
commit
6a399819cb
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user