From 429dda74b1ac18f5834f2ac8360d79a89cd7a2bb Mon Sep 17 00:00:00 2001 From: hypevhs <4498312-hypevhs@users.noreply.gitlab.com> Date: Tue, 7 Jul 2026 17:02:28 -0500 Subject: [PATCH] fix: show setcap warning at more accurate times A profile that hasn't been built yet would have no xrservice binary, so the call to getcap would not print "eip", causing the setcap warning to appear. Fix this by checking if the xrservice binary even exists. Switching between dev profiles would not recheck the setcap status; it'd still show a stale warning. Fix this by rechecking upon switching between profiles, which is consistent with other boxes in the main view. --- src/ui/main_view.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/main_view.rs b/src/ui/main_view.rs index 0c02e6f..fe4971c 100644 --- a/src/ui/main_view.rs +++ b/src/ui/main_view.rs @@ -445,6 +445,7 @@ impl AsyncComponent for MainView { .emit(OpenHmdCalibrationBoxMsg::SetVisible( prof.features.openhmd.enabled, )); + sender.input(Self::Input::CheckSetcap); } Self::Input::UpdateDevices(devs) => { self.devices_box @@ -463,6 +464,7 @@ impl AsyncComponent for MainView { let config = Config::get_config(); self.set_show_setcap_warn( if let Some(executable) = self.selected_profile.xrservice_binary(Some(&config)) + && executable.exists() { !verify_cap_sys_nice_eip(&executable).await.unwrap_or(true) } else { -- 2.51.2