From 8c3c99048dc8a4e6c1d2b63ecd193d06cda47b98 Mon Sep 17 00:00:00 2001 From: abv Date: Fri, 13 Jul 2012 16:09:09 +0400 Subject: [PATCH] 0023003: Photos of AIS Viewer are corrupted on Windows if tests are executed remotely Default position of 3d viewer window created by vinit command is set to the right-left corner of the screen (0,0) to avoid problems on small screens, e.g. dummy remote desktops Default position of 3d viewer window created by vinit command is set to be close to the right-left corner of the screen (0,0) to avoid problems on small screens, e.g. dummy screens of remote desktops --- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 754411d248..d84342e868 100755 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -179,8 +179,13 @@ void ViewerTest::ViewerInit (const Standard_Integer thePxLeft, const Standard_I { static Standard_Boolean isFirst = Standard_True; - Standard_Integer aPxLeft = 0; - Standard_Integer aPxTop = 460; + // Default position and dimension of the viewer window. + // Note that left top corner is set to be sufficiently small to have + // window fit in the small screens (actual for remote desktops, see #23003). + // The position corresponds to the window's client area, thus some + // gap is added for window frame to be visible. + Standard_Integer aPxLeft = 20; + Standard_Integer aPxTop = 40; Standard_Integer aPxWidth = 409; Standard_Integer aPxHeight = 409; if (thePxWidth != 0 && thePxHeight != 0) -- 2.39.5