Merge pull request #15038 from danteruiz/fix-login-screen

Case 21451: HMD Login Encouragement Screen is not Usable
This commit is contained in:
Shannon Romano 2019-02-27 14:41:41 -08:00 committed by GitHub
commit 1a83ab2dab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View file

@ -4979,6 +4979,15 @@ void Application::idle() {
}
}
{
if (_keyboardFocusWaitingOnRenderable && getEntities()->renderableForEntityId(_keyboardFocusedEntity.get())) {
_keyboardFocusWaitingOnRenderable = false;
QUuid entityId = _keyboardFocusedEntity.get();
setKeyboardFocusEntity(UNKNOWN_ENTITY_ID);
setKeyboardFocusEntity(entityId);
}
}
{
PerformanceTimer perfTimer("pluginIdle");
PerformanceWarning warn(showWarnings, "Application::idle()... pluginIdle()");
@ -5807,7 +5816,7 @@ void Application::setKeyboardFocusEntity(const QUuid& id) {
if (qApp->getLoginDialogPoppedUp() && !_loginDialogID.isNull()) {
if (id == _loginDialogID) {
emit loginDialogFocusEnabled();
} else {
} else if (!_keyboardFocusWaitingOnRenderable) {
// that's the only entity we want in focus;
return;
}
@ -5824,7 +5833,10 @@ void Application::setKeyboardFocusEntity(const QUuid& id) {
if (properties.getVisible()) {
auto entities = getEntities();
auto entityId = _keyboardFocusedEntity.get();
if (entities->wantsKeyboardFocus(entityId)) {
auto entityItemRenderable = entities->renderableForEntityId(entityId);
if (!entityItemRenderable) {
_keyboardFocusWaitingOnRenderable = true;
} else if (entityItemRenderable->wantsKeyboardFocus()) {
entities->setProxyWindow(entityId, _window->windowHandle());
if (_keyboardMouseDevice->isActive()) {
_keyboardMouseDevice->pluginFocusOutEvent();

View file

@ -732,6 +732,7 @@ private:
bool _failedToConnectToEntityServer { false };
bool _reticleClickPressed { false };
bool _keyboardFocusWaitingOnRenderable { false };
int _avatarAttachmentRequest = 0;