History

handle startup overlay visibility correctly

Brad Hefta-Gaub committed 10 years ago

Commit 366aa391 parent 526f9dc7 files · +24 −14Browse files

Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all

Unified · Split

interface/src/Application.cpp+15−1
@@ -1200,7 +1200,6 @@ void Application::initializeUi() { · 1199 unmodified lines
12001200 // OffscreenUi is a subclass of OffscreenQmlSurface specifically designed to
12011201 // support the window management and scripting proxies for VR use
12021202 offscreenUi->createDesktop(QString("hifi/Desktop.qml"));
1203− connect(offscreenUi.data(), &OffscreenUi::showDesktop, this, &Application::showDesktop);
12041203
12051204 // FIXME either expose so that dialogs can set this themselves or
12061205 // do better detection in the offscreen UI of what has focus
@@ -2435,6 +2434,17 @@ void Application::idle(uint64_t now) { · 1228 unmodified lines
24352434 if (_aboutToQuit) {
24362435 return; // bail early, nothing to do here.
24372436 }
2437+
2438+ Stats::getInstance()->updateStats();
2439+ AvatarInputs::getInstance()->update();
2440+
2441+ static bool firstIdle = true;
2442+ if (firstIdle) {
2443+ firstIdle = false;
2444+ auto offscreenUi = DependencyManager::get<OffscreenUi>();
2445+ connect(offscreenUi.data(), &OffscreenUi::showDesktop, this, &Application::showDesktop);
2446+ }
2447+
24382448
24392449 auto displayPlugin = getActiveDisplayPlugin();
24402450 // depending on whether we're throttling or not.
@@ -2998,6 +3008,10 @@ void Application::toggleOverlays() { · 557 unmodified lines
29983008 _overlayConductor.setEnabled(overlaysVisible);
29993009 }
30003010
3011+void Application::setOverlaysVisible(bool visible) {
3012+ _overlayConductor.setEnabled(visible);
3013+}
3014+
30013015 void Application::cycleCamera() {
30023016 auto menu = Menu::getInstance();
30033017 if (menu->isOptionChecked(MenuOption::FullscreenMirror)) {