toast when input capture fails

This commit is contained in:
galister committed 2026-07-30 03:26:47 +09:00
1 parent 67877d6a5f
commit 239337ae76
2 files changed
+13 -2

No files matched your search

+12 -1
View File
@@ -24,6 +24,8 @@ use std::{
time::{Duration, Instant},
};
use crate::subsystem::dbus::DbusConnector;
const IGNORE_PREFIX: &str = "WayVR";
const WATCHDOG_TIMEOUT: Duration = Duration::from_millis(5000);
const POLL_TIMEOUT_MS: i32 = 20;
@@ -486,7 +488,16 @@ fn worker_main(
}
}
Err(error) => {
log::warn!("Could not grab input devices after Super+Tab: {error}");
//TODO: translate
let _ = DbusConnector::notify_send(
"Could not capture input",
&format!("Linux user must be in input group!\n Error: \n{error}"),
1,
5000,
0,
true,
);
log::warn!("Could not grab input devices: {error}");
}
}
}
+1 -1
View File
@@ -896,7 +896,7 @@ impl WvrServerState {
audio_sample_player.play_sample(audio_system, "input_grab");
if !self.grab_toast_sent {
self.grab_toast_sent = true;
//TODO: toast
//TODO: translate
let _ = DbusConnector::notify_send(
"WayVR has your keyboard and mouse!",
"Super+Z to release",