From: kgv Date: Mon, 24 Sep 2018 08:31:40 +0000 (+0300) Subject: 0030157: Draw Harness - xwd image dump should not be limited by desktop size within... X-Git-Tag: V7_4_0_beta~390 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=72a2da560fb2fad58d76a91a63c6a943b7d4f5a9;p=occt-copy.git 0030157: Draw Harness - xwd image dump should not be limited by desktop size within batch testing DrawWindow now uses SWP_NOSENDCHANGING flag within batch mode to ensure that created window is not clipped in size by desktop dimensions. --- diff --git a/src/Draw/Draw_Window.cxx b/src/Draw/Draw_Window.cxx index 2fac12bc88..93a4606b99 100644 --- a/src/Draw/Draw_Window.cxx +++ b/src/Draw/Draw_Window.cxx @@ -1634,10 +1634,12 @@ void DrawWindow::ReleaseMemDC(HDC theMemDC) \*--------------------------------------------------------*/ void DrawWindow::SetPosition(Standard_Integer posX, Standard_Integer posY) { - SetWindowPos(win, 0, - posX, posY, - 0, 0, - SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER); + UINT aFlags = SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER; + if (Draw_VirtualWindows) + { + aFlags |= SWP_NOSENDCHANGING; + } + SetWindowPos (win, 0, posX, posY, 0, 0, aFlags); } @@ -1646,10 +1648,12 @@ void DrawWindow::SetPosition(Standard_Integer posX, Standard_Integer posY) \*--------------------------------------------------------*/ void DrawWindow::SetDimension(Standard_Integer dimX, Standard_Integer dimY) { - SetWindowPos(win, 0, - 0, 0, - dimX, dimY, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER); + UINT aFlags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER; + if (Draw_VirtualWindows) + { + aFlags |= SWP_NOSENDCHANGING; + } + SetWindowPos (win, 0, 0, 0, dimX, dimY, aFlags); }