Added support for controlling border and override redirect to the SingleWindow View::Config
This commit is contained in:
@@ -41,7 +41,8 @@ void SingleWindow::configure(osgViewer::View& view) const
|
||||
traits->y = _y;
|
||||
traits->width = _width;
|
||||
traits->height = _height;
|
||||
traits->windowDecoration = true;
|
||||
traits->windowDecoration = _border;
|
||||
traits->overrideRedirect = _overrideRedirect;
|
||||
traits->doubleBuffer = true;
|
||||
traits->sharedContext = 0;
|
||||
|
||||
@@ -60,7 +61,7 @@ void SingleWindow::configure(osgViewer::View& view) const
|
||||
if (traits->width<=0) traits->width = width;
|
||||
if (traits->height<=0) traits->height = height;
|
||||
}
|
||||
|
||||
|
||||
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
|
||||
|
||||
view.getCamera()->setGraphicsContext(gc.get());
|
||||
|
||||
@@ -14,4 +14,6 @@ REGISTER_OBJECT_WRAPPER( osgViewer_SingleWindow,
|
||||
ADD_INT_SERIALIZER( Width, -1);
|
||||
ADD_INT_SERIALIZER( Height, -1);
|
||||
ADD_UINT_SERIALIZER( ScreenNum, 0u);
|
||||
ADD_BOOL_SERIALIZER( Border, true);
|
||||
ADD_BOOL_SERIALIZER( OverrideRedirect, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user