History

Add option to disable triggering an away state when interface focus is lost.

Saracen committed 7 years ago

Commit 90e979b1 parent 6ccf16d6 files · +53 −2Browse files

Showing the changes to interface/src/Application.cpp (1 of 6 files). Show all

Unified · Split

interface/src/Application.cpp+7−0
@@ -962,6 +962,7 @@ const bool DEFAULT_PREFER_STYLUS_OVER_LASER = false; · 961 unmodified lines
962const bool DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS = false;962const bool DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS = false;
963const QString DEFAULT_CURSOR_NAME = "DEFAULT";963const QString DEFAULT_CURSOR_NAME = "DEFAULT";
964const bool DEFAULT_MINI_TABLET_ENABLED = true;964const bool DEFAULT_MINI_TABLET_ENABLED = true;
965const bool DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED = true;
965 966
966QSharedPointer<OffscreenUi> getOffscreenUI() {967QSharedPointer<OffscreenUi> getOffscreenUI() {
967#if !defined(DISABLE_QML)968#if !defined(DISABLE_QML)
@@ -992,6 +993,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 24 unmodified lines
992 _preferStylusOverLaserSetting("preferStylusOverLaser", DEFAULT_PREFER_STYLUS_OVER_LASER),993 _preferStylusOverLaserSetting("preferStylusOverLaser", DEFAULT_PREFER_STYLUS_OVER_LASER),
993 _preferAvatarFingerOverStylusSetting("preferAvatarFingerOverStylus", DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS),994 _preferAvatarFingerOverStylusSetting("preferAvatarFingerOverStylus", DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS),
994 _constrainToolbarPosition("toolbar/constrainToolbarToCenterX", true),995 _constrainToolbarPosition("toolbar/constrainToolbarToCenterX", true),
996 _awayStateWhenFocusLostInVREnabled("awayStateWhenFocusLostInVREnabled", DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED),
995 _preferredCursor("preferredCursor", DEFAULT_CURSOR_NAME),997 _preferredCursor("preferredCursor", DEFAULT_CURSOR_NAME),
996 _miniTabletEnabledSetting("miniTabletEnabled", DEFAULT_MINI_TABLET_ENABLED),998 _miniTabletEnabledSetting("miniTabletEnabled", DEFAULT_MINI_TABLET_ENABLED),
997 _scaleMirror(1.0f),999 _scaleMirror(1.0f),
@@ -3562,6 +3564,11 @@ void Application::setSettingConstrainToolbarPosition(bool setting) { · 2564 unmodified lines
3562 getOffscreenUI()->setConstrainToolbarToCenterX(setting);3564 getOffscreenUI()->setConstrainToolbarToCenterX(setting);
3563}3565}
3564 3566
3567void Application::setAwayStateWhenFocusLostInVREnabled(bool enabled) {
3568 _awayStateWhenFocusLostInVREnabled.set(enabled);
3569 emit awayStateWhenFocusLostInVRChanged(enabled);
3570}
3571
3565void Application::setMiniTabletEnabled(bool enabled) {3572void Application::setMiniTabletEnabled(bool enabled) {
3566 _miniTabletEnabledSetting.set(enabled);3573 _miniTabletEnabledSetting.set(enabled);
3567 emit miniTabletEnabledChanged(enabled);3574 emit miniTabletEnabledChanged(enabled);