blob: b3870218a2f817837d8d1ecb86c6dac504591348 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
--- Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx.orig 2020-06-26 13:24:40 UTC
+++ Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx
@@ -61,10 +61,22 @@ typedef ptrdiff_t GLsizeiptr;
#include <sstream>
+// Patch from upstream b3b088e8
+#include <X11/Xatom.h>
+#include <X11/cursorfont.h>
+
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-#include <X11/cursorfont.h>
+/*
+ * Work-around to get forward declarations of C typedef of anonymous
+ * structs working. We do not want to include XUtil.h in the header as
+ * it populates the global namespace.
+ */
+struct vtkXVisualInfo : public XVisualInfo
+{
+};
+
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
typedef GLXContext (*glXCreateContextAttribsARBProc)(
@@ -224,7 +236,7 @@ int XEventTypeEquals(Display*, XEvent* event, XPointer
return event->type == EventType;
}
-XVisualInfo* vtkXOpenGLRenderWindow::GetDesiredVisualInfo()
+vtkXVisualInfo* vtkXOpenGLRenderWindow::GetDesiredVisualInfo()
{
XVisualInfo* v = nullptr;
@@ -258,7 +270,7 @@ XVisualInfo* vtkXOpenGLRenderWindow::GetDesiredVisualI
vtkErrorMacro(<< "Could not find a decent visual\n");
}
}
- return (v);
+ return reinterpret_cast<vtkXVisualInfo*>(v);
}
vtkXOpenGLRenderWindow::vtkXOpenGLRenderWindow()
|