WayVR: External process support, various tweaks and bugfixes

- Support for foreign wayland clients, WayVR process is now separated into
  managed and external one
- Add `run_compositor_at_start` global param
- Add `primary` display param
- Export WAYLAND_DISPLAY number into XDG_RUNTIME_DIR directory
- Bugfix: Redraw event is not triggered after despawning a process
- Sanitization in WayVRConfig::post_load()
This commit is contained in:
Aleksander
2024-10-27 21:26:33 +01:00
parent 66fb2fc48c
commit 7e09c010db
10 changed files with 397 additions and 123 deletions

View File

@@ -100,7 +100,7 @@ impl AppState {
let session = AppSession::load();
#[cfg(feature = "wayvr")]
session.wayvr_config.post_load(&mut tasks);
let wayvr = session.wayvr_config.post_load(&mut tasks)?;
Ok(AppState {
fc: FontCache::new(session.config.primary_font.clone())?,
@@ -116,7 +116,7 @@ impl AppState {
keyboard_focus: KeyboardFocus::PhysicalScreen,
#[cfg(feature = "wayvr")]
wayvr: None,
wayvr,
})
}
@@ -126,7 +126,6 @@ impl AppState {
if let Some(wvr) = &self.wayvr {
Ok(wvr.clone())
} else {
log::info!("Initializing WayVR");
let wayvr = Rc::new(RefCell::new(WayVR::new()?));
self.wayvr = Some(wayvr.clone());
Ok(wayvr)