From 0099a4e549e985b29844eadcf993c521eeb11516 Mon Sep 17 00:00:00 2001 From: howard-stearns Date: Wed, 12 Oct 2016 11:23:06 -0700 Subject: [PATCH] allow hand controller operations when Interface doesn't have focus, but ONLY when in hmd. --- scripts/system/controllers/handControllerPointer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/system/controllers/handControllerPointer.js b/scripts/system/controllers/handControllerPointer.js index 5bb8ea8a90..fb256413ae 100644 --- a/scripts/system/controllers/handControllerPointer.js +++ b/scripts/system/controllers/handControllerPointer.js @@ -471,7 +471,12 @@ function update() { if (!Menu.isOptionChecked("First Person")) { return off(); // What to do? menus can be behind hand! } - if (!Window.hasFocus() || !Reticle.allowMouseCapture) { + if ((!Window.hasFocus() && !HMD.active) || !Reticle.allowMouseCapture) { + // In desktop it's pretty clear when another app is on top. In that case we bail, because + // hand controllers might be sputtering "valid" data and that will keep someone from deliberately + // using the mouse on another app. (Fogbugz case 546.) + // However, in HMD, you might not realize you're not on top, and you wouldn't be able to operate + // other apps anyway. So in that case, we DO keep going even though we're not on top. (Fogbugz 1831.) return off(); // Don't mess with other apps or paused mouse activity } leftTrigger.update();