Salome HOME
Merge branch 'V8_3_asterstudy' into V8_3_BR
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewPort.cxx
index 7575a6a66a1953c80898d140e32aaed53bd65b90..d0d2ce19d94539ccd0747b8e3d6b41c027cf1920 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -40,7 +40,7 @@
 
 #include <stdlib.h>
 
-#if !defined WIN32
+#if !defined WIN32 && !defined __APPLE__
 #include <QX11Info>
 #include <GL/glx.h>
 #include <X11/Xlib.h>
@@ -218,7 +218,9 @@ void OCCViewer_ViewPort::initialize()
   setBackgroundRole( QPalette::NoRole );//NoBackground );
   // set focus policy to threat QContextMenuEvent from keyboard  
   setFocusPolicy( Qt::StrongFocus );
+#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0) && OCC_VERSION_LARGE < 0x07000000) || QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
   setAttribute( Qt::WA_PaintOnScreen );
+#endif
   setAttribute( Qt::WA_NoSystemBackground );
 }
 
@@ -234,7 +236,7 @@ void OCCViewer_ViewPort::cleanup()
 */
 void OCCViewer_ViewPort::selectVisualId()
 {
-#if !defined WIN32
+#if !defined WIN32 && !defined __APPLE__
   XVisualInfo* pVisualInfo;
   if ( QX11Info::display() )
   {
@@ -468,36 +470,6 @@ QPaintEngine* OCCViewer_ViewPort::paintEngine() const
   return 0;
 }
 
-/*!
-    Creates the popup. [ virtual protected ]
-*/
-/*void OCCViewer_ViewPort::onCreatePopup( QPopupMenu* popup )
-{
-  if ( popup )
-  {
-    QtxAction* a = new QtxAction( "", tr( "MEN_VP_CHANGEBGR" ), 0, this );
-    a->setStatusTip( tr( "PRP_VP_CHANGEBGR" ) );
-    connect( a, SIGNAL( activated() ), SLOT( onChangeBgColor()));
-    myPopupActions.append( a );
-    a->addTo( popup );
-  }
-}*/
-
-/*!
-    Destroys the popup. [ virtual protected ]
-*/
-/*void OCCViewer_ViewPort::onDestroyPopup( QPopupMenu* popup )
-{
-  if ( popup )
-  {
-    for ( QtxAction* a = myPopupActions.first(); a; a = myPopupActions.next() )
-      a->removeFrom( popup );
-    //while (!myPopupActions.isEmpty())
-    //  delete myPopupActions.takeFirst();
-    myPopupActions.clear();
-  }
-}*/
-
 /*!
   Performs synchronization of view parameters with the specified view.
   Returns \c true if synchronization is done successfully or \c false otherwise.