diff --git a/diff.patch b/diff.patch new file mode 100644 index 0000000000..4f433568b9 --- /dev/null +++ b/diff.patch @@ -0,0 +1,40 @@ +diff --git a/scripts/simplifiedUI/ui/simplifiedUI.js b/scripts/simplifiedUI/ui/simplifiedUI.js +index cdf6a9591a..4116eb4314 100644 +--- a/scripts/simplifiedUI/ui/simplifiedUI.js ++++ b/scripts/simplifiedUI/ui/simplifiedUI.js +@@ -457,9 +457,16 @@ function onGeometryChanged(rect) { + } + } + +-function ensureFirstPersonCameraInHMD(isHMDMode) { ++function onDisplayModeChanged(isHMDMode) { ++ print("TEST 2"); + if (isHMDMode) { + Camera.setModeString("first person"); ++ } else { ++ //setTimeout(function () { ++ toolbar.writeProperty("visible", false); ++ print("TEST"); ++ //}, 10000); ++ + } + } + +@@ -505,7 +512,7 @@ function startup() { + updateOutputDeviceMutedOverlay(isOutputMuted()); + Audio.mutedDesktopChanged.connect(onDesktopInputDeviceMutedChanged); + Window.geometryChanged.connect(onGeometryChanged); +- HMD.displayModeChanged.connect(ensureFirstPersonCameraInHMD); ++ HMD.displayModeChanged.connect(onDisplayModeChanged); + Audio.avatarGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay); + Audio.localInjectorGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay); + Audio.serverInjectorGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay); +@@ -559,7 +566,7 @@ function shutdown() { + + Audio.mutedDesktopChanged.disconnect(onDesktopInputDeviceMutedChanged); + Window.geometryChanged.disconnect(onGeometryChanged); +- HMD.displayModeChanged.disconnect(ensureFirstPersonCameraInHMD); ++ HMD.displayModeChanged.disconnect(onDisplayModeChanged); + Audio.avatarGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay); + Audio.localInjectorGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay); + Audio.serverInjectorGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay); diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 6d8e2a31af..547b8d387b 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -978,7 +978,7 @@ Setting::Handle sessionRunTime{ "sessionRunTime", 0 }; const float DEFAULT_HMD_TABLET_SCALE_PERCENT = 60.0f; const float DEFAULT_DESKTOP_TABLET_SCALE_PERCENT = 75.0f; -const bool DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR = true; +const bool DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR = false; const bool DEFAULT_HMD_TABLET_BECOMES_TOOLBAR = false; const bool DEFAULT_PREFER_STYLUS_OVER_LASER = false; const bool DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS = false; @@ -9301,6 +9301,7 @@ void Application::updateSystemTabletMode() { if (isHMDMode()) { DependencyManager::get()->setToolbarMode(getHmdTabletBecomesToolbarSetting()); } else { + //_desktopTabletBecomesToolbarSetting.set(false); DependencyManager::get()->setToolbarMode(getDesktopTabletBecomesToolbarSetting()); } } diff --git a/scripts/simplifiedUI/ui/simplifiedUI.js b/scripts/simplifiedUI/ui/simplifiedUI.js index cdf6a9591a..7547f04fa2 100644 --- a/scripts/simplifiedUI/ui/simplifiedUI.js +++ b/scripts/simplifiedUI/ui/simplifiedUI.js @@ -457,9 +457,15 @@ function onGeometryChanged(rect) { } } -function ensureFirstPersonCameraInHMD(isHMDMode) { +function onDisplayModeChanged(isHMDMode) { if (isHMDMode) { Camera.setModeString("first person"); + } else { + //works for now, but not a permanent fix by any means. + Script.setTimeout(function () { + var toolbar = Toolbars.getToolbar(TOOLBAR_NAME); + toolbar.writeProperty("visible", false); + }, 700); } } @@ -505,7 +511,7 @@ function startup() { updateOutputDeviceMutedOverlay(isOutputMuted()); Audio.mutedDesktopChanged.connect(onDesktopInputDeviceMutedChanged); Window.geometryChanged.connect(onGeometryChanged); - HMD.displayModeChanged.connect(ensureFirstPersonCameraInHMD); + HMD.displayModeChanged.connect(onDisplayModeChanged); Audio.avatarGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay); Audio.localInjectorGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay); Audio.serverInjectorGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay); @@ -559,7 +565,7 @@ function shutdown() { Audio.mutedDesktopChanged.disconnect(onDesktopInputDeviceMutedChanged); Window.geometryChanged.disconnect(onGeometryChanged); - HMD.displayModeChanged.disconnect(ensureFirstPersonCameraInHMD); + HMD.displayModeChanged.disconnect(onDisplayModeChanged); Audio.avatarGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay); Audio.localInjectorGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay); Audio.serverInjectorGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);