[osg-users] change focus between multiple windows

Sebastian Schmidt herrdersuppen at gmail.com
Mon Jan 8 06:57:02 PST 2018

My compositeviewer has two views, each containing a osgWidget::Canvas (window).
When i press a widget inside the first window, the second window should be restored (if minimized) and focused.
The restoring works but the second window stays in background.


osg::ref_ptr<osgViewer::GraphicsWindow> pWindow = windows[1];
int x;
int y;
int width;
int height;
pWindow->getWindowRectangle(x, y, width, height);
pWindow->setWindowRectangle(x, y, width, height);

OSG Version: 3.0.1
OS: OpenSuse Leap 42.1

Read this topic online here:

More information about the osg-users mailing list