Changed GraphicsWindowX11 so that it creates two Display* connextions to the Xserver,

one for the graphics thread, one for the main thread that querries events
This commit is contained in:
Robert Osfield
2007-02-09 13:51:28 +00:00
parent 162d08f541
commit 2a9d2bb25a
2 changed files with 95 additions and 40 deletions

View File

@@ -36,6 +36,7 @@ class GraphicsWindowX11 : public osgViewer::GraphicsWindow
GraphicsWindowX11(osg::GraphicsContext::Traits* traits):
_valid(false),
_display(0),
_eventDisplay(0),
_parent(0),
_window(0),
_visualInfo(0),
@@ -101,6 +102,7 @@ class GraphicsWindowX11 : public osgViewer::GraphicsWindow
// X11 specific aces functions
Display* getDisplay() { return _display; }
Display* getEventDisplay() { return _eventDisplay; }
Window& getParent() { return _parent; }
Window& getWindow() { return _window; }
@@ -120,6 +122,7 @@ class GraphicsWindowX11 : public osgViewer::GraphicsWindow
bool _valid;
Display* _display;
Display* _eventDisplay;
Window _parent;
Window _window;
XVisualInfo* _visualInfo;