]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Passing X display and visual suitable for 3D visualization to QApplication constructo...
authorsan <san@opencascade.com>
Mon, 12 Apr 2010 13:43:37 +0000 (13:43 +0000)
committersan <san@opencascade.com>
Mon, 12 Apr 2010 13:43:37 +0000 (13:43 +0000)
src/SUITApp/SUITApp_Application.cxx

index 073fe0fc3327bebc0ad8ca7358eb50a0158866c9..f82818766e36e65644b2e212ee247efd803304a0 100644 (file)
@@ -24,6 +24,8 @@
 #include <SUIT_Tools.h>
 #include <SUIT_ExceptionHandler.h>
 
+#include <Qtx.h>
+
 #include <QDir>
 #include <QTranslator>
 
@@ -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 )
 {