diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp index 433a72f..c703cfb 100644 --- a/src/steamcompmgr.cpp +++ b/src/steamcompmgr.cpp @@ -3653,7 +3653,19 @@ determine_and_apply_focus() } } - sdlwindow_visible( global_focus.focusWindow != nullptr ); +#if HAVE_OPENVR + if ( BIsVRSession() ) + { + vrsession_set_dashboard_visible( global_focus.focusWindow != nullptr ); + } + else +#endif + { + if ( !BIsVRSession() && BIsNested() ) + { + sdlwindow_visible( global_focus.focusWindow != nullptr ); + } + } // Some games such as Disgaea PC (405900) don't take controller input until // the window is first clicked on despite it having focus. diff --git a/src/vr_session.cpp b/src/vr_session.cpp index ac9ee20..eb21679 100644 --- a/src/vr_session.cpp +++ b/src/vr_session.cpp @@ -1,5 +1,6 @@ #include "vr_session.hpp" #include "main.hpp" +#include "openvr.h" #include "rendervulkan.hpp" #include "steamcompmgr.hpp" #include "wlserver.hpp" @@ -149,6 +150,7 @@ bool vrsession_init() vr::VROverlay()->SetOverlayFlag( GetVR().hOverlay, vr::VROverlayFlags_EnableControlBarClose, GetVR().bEnableControlBarClose ); vr::VROverlay()->SetOverlayFlag( GetVR().hOverlay, vr::VROverlayFlags_WantsModalBehavior, GetVR().bModal ); vr::VROverlay()->SetOverlayFlag( GetVR().hOverlay, vr::VROverlayFlags_SendVRSmoothScrollEvents, true ); + vr::VROverlay()->SetOverlayFlag( GetVR().hOverlay, vr::VROverlayFlags_VisibleInDashboard, false ); vrsession_update_touch_mode(); vr::VROverlay()->SetOverlayWidthInMeters( GetVR().hOverlay, GetVR().flPhysicalWidth ); @@ -183,6 +185,11 @@ bool vrsession_visible() return g_bOverlayVisible.load(); } +void vrsession_set_dashboard_visible( bool bVisible ) +{ + vr::VROverlay()->SetOverlayFlag( GetVR().hOverlay, vr::VROverlayFlags_VisibleInDashboard, bVisible ); +} + void vrsession_wait_until_visible() { if (vrsession_visible()) diff --git a/src/vr_session.hpp b/src/vr_session.hpp index 83bddb2..f8007ae 100644 --- a/src/vr_session.hpp +++ b/src/vr_session.hpp @@ -27,3 +27,5 @@ void vrsession_title( const char *title, std::shared_ptr> bool vrsession_ime_init(); void vrsession_steam_mode( bool bSteamMode ); + +void vrsession_set_dashboard_visible( bool bVisible );