Salome HOME
5240a410e5b83065c34d00d97a8d5412d968e81e
[tools/configuration.git] / config / patches / edf / ParaView-5.4.0-463c0633-vtkXOpenGLRenderWindow.cxx.patch
1 --- orig/ParaView-5.4.0-463c0633_SRC/VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx   2017-09-13 10:51:02.000000000 +0300
2 +++ ParaView-5.4.0-463c0633_SRC/VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx        2017-11-14 16:15:29.312760666 +0300
3 @@ -402,10 +402,13 @@
4    }
5  }
6  
7 +static bool ctxErrorOccurred = false;
8 +
9  extern "C"
10  {
11    int vtkXOGLContextCreationErrorHandler(Display*, XErrorEvent*)
12    {
13 +    ctxErrorOccurred = true;
14      return 1;
15    }
16  }
17 @@ -584,6 +587,11 @@
18              GL_TRUE, context_attribs );
19          // Sync to ensure any errors generated are processed.
20          XSync( this->DisplayId, False );
21 +        if(ctxErrorOccurred)
22 +        {
23 +          this->Internal->ContextId = nullptr;
24 +          ctxErrorOccurred = false;
25 +        }
26        }
27        XSetErrorHandler(previousHandler);
28        if ( this->Internal->ContextId )