fix the overlays visible on startup case

This commit is contained in:
Brad Hefta-Gaub 2016-02-25 16:02:05 -08:00
parent 366aa39be8
commit 519a90f2bd

View file

@ -2438,11 +2438,14 @@ void Application::idle(uint64_t now) {
Stats::getInstance()->updateStats();
AvatarInputs::getInstance()->update();
// These tasks need to be done on our first idle, because we don't want the showing of
// overlay subwindows to do a showDesktop() until after the first time through
static bool firstIdle = true;
if (firstIdle) {
firstIdle = false;
auto offscreenUi = DependencyManager::get<OffscreenUi>();
connect(offscreenUi.data(), &OffscreenUi::showDesktop, this, &Application::showDesktop);
_overlayConductor.setEnabled(Menu::getInstance()->isOptionChecked(MenuOption::Overlays));
}