From 1ad8ba358eeb14ab7ab3a493ba58830a326ecf17 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 5 Nov 2015 14:38:04 +0000 Subject: [PATCH] From Mathias Froehlich, "Avoid per frame X11 roundtrips" git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15173 16af8721-9629-0410-8352-f15c8da7e697 --- src/osgViewer/GraphicsWindowX11.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osgViewer/GraphicsWindowX11.cpp b/src/osgViewer/GraphicsWindowX11.cpp index fcad95f97..d652b5d24 100644 --- a/src/osgViewer/GraphicsWindowX11.cpp +++ b/src/osgViewer/GraphicsWindowX11.cpp @@ -1220,6 +1220,7 @@ bool GraphicsWindowX11::checkEvents() int windowY = _traits->y; int windowWidth = _traits->width; int windowHeight = _traits->height; + bool needNewWindowSize = false; Time firstEventTime = 0; @@ -1275,6 +1276,7 @@ bool GraphicsWindowX11::checkEvents() windowWidth = ev.xconfigure.width; windowHeight = ev.xconfigure.height; } + needNewWindowSize = true; break; } @@ -1294,6 +1296,7 @@ bool GraphicsWindowX11::checkEvents() windowWidth = watt.width; windowHeight = watt.height; } + needNewWindowSize = true; break; } @@ -1552,6 +1555,7 @@ bool GraphicsWindowX11::checkEvents() // get window geometry relative to root window/screen + if (needNewWindowSize) { XWindowAttributes watt; Window child_return;