diff --git a/include/osgViewer/GraphicsWindow b/include/osgViewer/GraphicsWindow index ce6aa52ba..a15349f03 100644 --- a/include/osgViewer/GraphicsWindow +++ b/include/osgViewer/GraphicsWindow @@ -89,6 +89,9 @@ class OSGVIEWER_EXPORT GraphicsWindow : public osg::GraphicsContext, public osgG /** Get focus on if the pointer is in this window.*/ virtual void grabFocusIfPointerInWindow() { osg::notify(osg::NOTICE)<<"GraphicsWindow::grabFocusIfPointerInWindow(..) not implemented."<x, _traits->y, _traits->width, _traits->height, SWP_NOMOVE|SWP_NOSIZE); + SetWindowPos(_hwnd, HWND_NOTOPMOST, _traits->x, _traits->y, _traits->width, _traits->height, SWP_NOMOVE|SWP_NOSIZE); + +} + diff --git a/src/osgViewer/GraphicsWindowX11.cpp b/src/osgViewer/GraphicsWindowX11.cpp index 7585c289f..9fc57d7c2 100644 --- a/src/osgViewer/GraphicsWindowX11.cpp +++ b/src/osgViewer/GraphicsWindowX11.cpp @@ -668,8 +668,8 @@ bool GraphicsWindowX11::createWindow() _traits->y, _traits->width, _traits->height, 0, _visualInfo->depth, InputOutput, - _visualInfo->visual, mask, &swatt ); - + _visualInfo->visual, mask, &swatt ); + if (!_window) { osg::notify(osg::NOTICE)<<"Error: Unable to create Window."<windowName.c_str(),(const char *)windowName.value) == 0)) xraise = true; + } + if (xraise) XRaiseWindow(display,_window); + else + { + XGetWindowAttributes(display, _window, &winAttrib); + XReparentWindow(display, _window, _parent, winAttrib.x, winAttrib.y); + } + XFree(children); + + XFlush(display); + XSync(display,0); +}