Hi Karl,

The issue you are seeing is mostly like the window manager redirecting
the request for a full sized window to produce a window that fits one
screen.  To tell X11 to override the window manage redirect you'll
need to set the Traits::overrideRedirect flag to true.

Robert.

On Thu, Jan 20, 2011 at 10:08 PM, Cary, Karl A. <[email protected]> wrote:
> I am having an issue with screen resolution in Twinview. If I am in clone
> mode or non twinview, everything is fine. But when I am in twinview
> otherwise, the screen resolution changes even though I am not telling it to.
> It is essentially adding an invisible window decoration as that is the size
> it is changing by.
>
>
>
> My setup: I have 2 monitors, one is 1280x1024, the other is 1920x1200. I
> would like my application to show up on the 1280x1024 monitor and it does,
> just not at 1280x1024. When I create my graphics context, I do the
> following:
>
>
>
> osg::ref_ptr<osg::GraphicsContext::Traits> traits = new
> osg::GraphicsContext::Traits;
>
> traits->x = 0;
>
> traits->y = 0;
>
> traits->width = 1280;
>
> traits->height = 1024;
>
> traits->windowDecoration = false;
>
> traits->windowName = “myApp”;
>
> traits->doubleBuffer = true;
>
> traits->sharedContext = 0;
>
>
>
> osg::DisplaySettings* ds = osg::DisplaySettings::instance();
>
> traits->sampleBuffers = ds->getMultiSamples;
>
> traits->samples = ds->getNumMultiSamples();
>
>
>
> osg::ref_ptr<osg::GraphicsContext> gc =
> osg::GraphicsContext::createGraphicsContext(traits.get());
>
>
>
> At this point if I pause my program, the resolution is already wrong. It is
> starting at 0,0, but it is missing the far right and bottom, about the size
> of the window decoration border. If I then go through and get the window out
> of the osgViewer and do a window->setWindowRectangle(0,0,1280,1024), the
> screen goes full screen again. However any time I do anything at all to the
> viewer or wsi or window, or sets back to the other size. For example if I do
> a window->useCursor(true) call it resets.
>
>
>
> What am I doing wrong? I know it is not a driver issue as this was formerly
> a Performer app and it works just fine in there with the same system so it
> has to either be an issue in OSG (I doubt) or an error in how I am setting
> up the window. Thank you.
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to