From ccebf3edef562d85bcf98c3d40a02c9fa2649cdd Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 8 Oct 2018 17:18:40 -0700 Subject: [PATCH] omitting keyboard focus hack --- interface/src/Application.cpp | 23 +++++++---------------- libraries/ui/src/OffscreenUi.cpp | 2 +- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index aa2b382c58..16ab667233 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2328,23 +2328,14 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo connect(&AndroidHelper::instance(), &AndroidHelper::enterForeground, this, &Application::enterForeground); AndroidHelper::instance().notifyLoadComplete(); #else - static int CHECK_LOGIN_TIMER = 3000; - QTimer* checkLoginTimer = new QTimer(this); - checkLoginTimer->setInterval(CHECK_LOGIN_TIMER); - checkLoginTimer->setSingleShot(true); - connect(checkLoginTimer, &QTimer::timeout, this, []() { - auto accountManager = DependencyManager::get(); - auto dialogsManager = DependencyManager::get(); - if (!accountManager->isLoggedIn()) { - Setting::Handle{"loginDialogPoppedUp", false}.set(true); - dialogsManager->showLoginDialog(); - QJsonObject loginData = {}; - loginData["action"] = "login dialog shown"; - UserActivityLogger::getInstance().logAction("encourageLoginDialog", loginData); - } - }); + if (!accountManager->isLoggedIn()) { + Setting::Handle{"loginDialogPoppedUp", false}.set(true); + dialogsManager->showLoginDialog(); + QJsonObject loginData = {}; + loginData["action"] = "login dialog shown"; + UserActivityLogger::getInstance().logAction("encourageLoginDialog", loginData); + } Setting::Handle{"loginDialogPoppedUp", false}.set(false); - checkLoginTimer->start(); #endif } diff --git a/libraries/ui/src/OffscreenUi.cpp b/libraries/ui/src/OffscreenUi.cpp index 0aad297587..2cbd6517b0 100644 --- a/libraries/ui/src/OffscreenUi.cpp +++ b/libraries/ui/src/OffscreenUi.cpp @@ -673,7 +673,7 @@ void OffscreenUi::createDesktop(const QUrl& url) { menuInitializer(_vrMenu); } - new KeyboardFocusHack(); + // new KeyboardFocusHack(); connect(_desktop, SIGNAL(showDesktop()), this, SIGNAL(showDesktop())); emit desktopReady(); });