another login fix

This commit is contained in:
danteruiz 2019-02-28 17:11:48 -08:00
parent 0f0ed0fbc4
commit 9fe0309ae6
2 changed files with 6 additions and 3 deletions

View file

@ -4980,10 +4980,11 @@ void Application::idle() {
}
{
if (_keyboardFocusWaitingOnRenderable && getEntities()->renderableForEntityId(_keyboardFocusedEntity.get())) {
_keyboardFocusWaitingOnRenderable = false;
QUuid entityId = _keyboardFocusedEntity.get();
if (_keyboardFocusWaitingOnRenderable && getEntities()->renderableForEntityId(_entityIdWaitingOnRenderable.get())) {
QUuid entityId = _entityIdWaitingOnRenderable.get();
_entityIdWaitingOnRenderable.set(UNKNOWN_ENTITY_ID);
setKeyboardFocusEntity(UNKNOWN_ENTITY_ID);
_keyboardFocusWaitingOnRenderable = false;
setKeyboardFocusEntity(entityId);
}
}
@ -5836,6 +5837,7 @@ void Application::setKeyboardFocusEntity(const QUuid& id) {
auto entityItemRenderable = entities->renderableForEntityId(entityId);
if (!entityItemRenderable) {
_keyboardFocusWaitingOnRenderable = true;
_entityIdWaitingOnRenderable.set(id);
} else if (entityItemRenderable->wantsKeyboardFocus()) {
entities->setProxyWindow(entityId, _window->windowHandle());
if (_keyboardMouseDevice->isActive()) {

View file

@ -733,6 +733,7 @@ private:
bool _reticleClickPressed { false };
bool _keyboardFocusWaitingOnRenderable { false };
ThreadSafeValueCache<EntityItemID> _entityIdWaitingOnRenderable;
int _avatarAttachmentRequest = 0;