Merge branch 'master' of https://github.com/highfidelity/hifi into loginInitiative2

This commit is contained in:
Wayne Chen 2018-11-15 09:46:32 -08:00
commit bf731f32b9
3 changed files with 9 additions and 1 deletions

View file

@ -4199,6 +4199,10 @@ void Application::focusOutEvent(QFocusEvent* event) {
SpacemouseManager::getInstance().ManagerFocusOutEvent();
#endif
synthesizeKeyReleasEvents();
}
void Application::synthesizeKeyReleasEvents() {
// synthesize events for keys currently pressed, since we may not get their release events
// Because our key event handlers may manipulate _keysPressed, lets swap the keys pressed into a local copy,
// clearing the existing list.
@ -4824,6 +4828,7 @@ void Application::idle() {
if (_keyboardDeviceHasFocus && activeFocusItem != offscreenUi->getRootItem()) {
_keyboardMouseDevice->pluginFocusOutEvent();
_keyboardDeviceHasFocus = false;
synthesizeKeyReleasEvents();
} else if (activeFocusItem == offscreenUi->getRootItem()) {
_keyboardDeviceHasFocus = true;
}

View file

@ -560,6 +560,7 @@ private:
void keyReleaseEvent(QKeyEvent* event);
void focusOutEvent(QFocusEvent* event);
void synthesizeKeyReleasEvents();
void focusInEvent(QFocusEvent* event);
void mouseMoveEvent(QMouseEvent* event);

View file

@ -32,8 +32,10 @@ LAYOUT_STD140(binding=0) uniform standardInputsBuffer {
vec4 date;
// Offset 16, acts as vec4 for alignment purposes
vec3 worldPosition;
// Offset 32, acts as vec4 for alignment purposes
// Offset 32, acts as vec4 for alignment purposes (but not packing purposes)
vec3 worldScale;
// We need this float here to keep globalTime from getting pulled to offset 44
float _spare0;
// Offset 48
float globalTime;
// Offset 52