From 98dbdce52a548568d0b9725797a4262aee57f1fc Mon Sep 17 00:00:00 2001 From: san Date: Mon, 12 Apr 2010 13:43:37 +0000 Subject: [PATCH] Passing X display and visual suitable for 3D visualization to QApplication constructor in order to make SALOEM viewers work with some non-native X servers --- src/SUITApp/SUITApp_Application.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/SUITApp/SUITApp_Application.cxx b/src/SUITApp/SUITApp_Application.cxx index 073fe0fc3..f82818766 100644 --- a/src/SUITApp/SUITApp_Application.cxx +++ b/src/SUITApp/SUITApp_Application.cxx @@ -24,6 +24,8 @@ #include #include +#include + #include #include @@ -41,7 +43,13 @@ SUITApp_Application::SUITApp_Application( int& argc, char** argv, SUIT_Exception #ifdef ENABLE_TESTRECORDER : TestApplication( argc, argv ), #else - : QApplication( argc, argv ), +#ifndef WIN32 + // san: Opening an X display and choosing a visual most suitable for 3D visualization + // in order to make SALOME viewers work with non-native X servers + : QApplication( (Display*)Qtx::getDisplay(), argc, argv, Qtx::getVisual() ), +#else + : QApplication( argc, argv ), +#endif #endif myExceptHandler( hand ) { -- 2.39.2