From f67d10ba0c3e6ffe39b6406e580b4990dac41b50 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 19 Jul 2006 12:35:33 +0000 Subject: [PATCH] Moved sync to before the keyboard mouse startThread to try to avoid some threading issue on start up of some apps. --- src/osgProducer/Viewer.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/osgProducer/Viewer.cpp b/src/osgProducer/Viewer.cpp index 6f444bf0d..bf493c4c5 100644 --- a/src/osgProducer/Viewer.cpp +++ b/src/osgProducer/Viewer.cpp @@ -521,9 +521,17 @@ bool Viewer::realize() OsgCameraGroup::realize(); + // force a sync before we intialize the keyswitch manipulator to home + // so that Producer has a chance to set up the windows before we do + // any work on them. + OsgCameraGroup::sync(); + #ifndef SINGLE_THREAD_KEYBOARDMOUSE // kick start the keyboard mouse if needed. - if (_kbm.valid() && !_kbm->isRunning()) _kbm->startThread(); + if (_kbm.valid() && !_kbm->isRunning()) + { + _kbm->startThread(); + } #endif // by default set up the DatabasePager. { @@ -551,10 +559,6 @@ bool Viewer::realize() } - // force a sync before we intialize the keyswitch manipulator to home - // so that Producer has a chance to set up the windows before we do - // any work on them. - OsgCameraGroup::sync(); if (_keyswitchManipulator.valid() && _keyswitchManipulator->getCurrentMatrixManipulator()) {