From Mathias Froehlich, "Avoid per frame X11 roundtrips"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15174 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
636d595912
commit
46904ff67a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user