remove wayvr feature
This commit is contained in:
@@ -3,8 +3,6 @@ use std::{path::PathBuf, sync::LazyLock};
|
|||||||
|
|
||||||
pub enum ConfigRoot {
|
pub enum ConfigRoot {
|
||||||
Generic,
|
Generic,
|
||||||
#[allow(dead_code)]
|
|
||||||
WayVR,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const FALLBACK_CONFIG_PATH: &str = "/tmp/wlxoverlay";
|
const FALLBACK_CONFIG_PATH: &str = "/tmp/wlxoverlay";
|
||||||
@@ -27,7 +25,6 @@ impl ConfigRoot {
|
|||||||
pub fn get_conf_d_path(&self) -> PathBuf {
|
pub fn get_conf_d_path(&self) -> PathBuf {
|
||||||
get_config_root().join(match self {
|
get_config_root().join(match self {
|
||||||
Self::Generic => "conf.d",
|
Self::Generic => "conf.d",
|
||||||
Self::WayVR => "wayvr.conf.d",
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,35 +73,29 @@ serde_json5 = "0.2.1"
|
|||||||
serde_yaml = "0.9.34"
|
serde_yaml = "0.9.34"
|
||||||
signal-hook = "0.3.18"
|
signal-hook = "0.3.18"
|
||||||
smallvec = "1.15.1"
|
smallvec = "1.15.1"
|
||||||
|
smithay = { version = "0.7.0", default-features = false, features = [
|
||||||
|
"backend_vulkan",
|
||||||
|
"desktop",
|
||||||
|
"xwayland",
|
||||||
|
"wayland_frontend",
|
||||||
|
]}
|
||||||
sysinfo = { version = "0.37" }
|
sysinfo = { version = "0.37" }
|
||||||
thiserror = "2.0"
|
thiserror = "2.0"
|
||||||
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
|
||||||
tracing = "0.1.43"
|
tracing = "0.1.43"
|
||||||
|
uuid = { version = "1.19.0", features = ["v4", "fast-rng"] }
|
||||||
|
wayland-client = { workspace = true }
|
||||||
winit = { version = "0.30.12", optional = true }
|
winit = { version = "0.30.12", optional = true }
|
||||||
xcb = { version = "1.6.0", optional = true, features = [
|
xcb = { version = "1.6.0", optional = true, features = [
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
] }
|
] }
|
||||||
xkbcommon = { version = "0.8.0" } # 0.9.0 breaks keymap import on some distros
|
xkbcommon = { version = "0.8.0" } # 0.9.0 breaks keymap import on some distros
|
||||||
|
|
||||||
################################
|
|
||||||
# Wayland Server deps
|
|
||||||
################################
|
|
||||||
smithay = { version = "0.7.0", default-features = false, features = [
|
|
||||||
"backend_vulkan",
|
|
||||||
"desktop",
|
|
||||||
"xwayland",
|
|
||||||
"wayland_frontend",
|
|
||||||
], optional = true }
|
|
||||||
uuid = { version = "1.19.0", features = ["v4", "fast-rng"], optional = true }
|
|
||||||
wayland-client = { workspace = true, optional = true }
|
|
||||||
################################
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
regex.workspace = true
|
regex.workspace = true
|
||||||
|
|
||||||
# TODO: rename "wayvr" feature to "wayland-server"
|
|
||||||
[features]
|
[features]
|
||||||
default = ["openvr", "openxr", "osc", "x11", "wayland", "wayvr"]
|
default = ["openvr", "openxr", "osc", "x11", "wayland" ]
|
||||||
openvr = ["dep:ovr_overlay", "dep:json"]
|
openvr = ["dep:ovr_overlay", "dep:json"]
|
||||||
openxr = ["dep:openxr", "dep:libmonado"]
|
openxr = ["dep:openxr", "dep:libmonado"]
|
||||||
osc = ["dep:rosc"]
|
osc = ["dep:rosc"]
|
||||||
@@ -110,5 +104,4 @@ wayland = ["pipewire", "wlx-capture/wlr", "xkbcommon/wayland"]
|
|||||||
pipewire = ["wlx-capture/pipewire"]
|
pipewire = ["wlx-capture/pipewire"]
|
||||||
uidev = ["dep:winit"]
|
uidev = ["dep:winit"]
|
||||||
xcb = ["dep:xcb"]
|
xcb = ["dep:xcb"]
|
||||||
wayvr = ["dep:smithay", "dep:uuid", "dep:wayland-client"]
|
|
||||||
as-raw-xcb-connection = []
|
as-raw-xcb-connection = []
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ pub mod openvr;
|
|||||||
#[cfg(feature = "openxr")]
|
#[cfg(feature = "openxr")]
|
||||||
pub mod openxr;
|
pub mod openxr;
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
pub mod wayvr;
|
pub mod wayvr;
|
||||||
|
|
||||||
pub mod set;
|
pub mod set;
|
||||||
|
|||||||
@@ -253,7 +253,6 @@ pub fn openvr_run(show_by_default: bool, headless: bool) -> Result<(), BackendEr
|
|||||||
overlays.show_hide(&mut app);
|
overlays.show_hide(&mut app);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
if app
|
if app
|
||||||
.input_state
|
.input_state
|
||||||
.pointers
|
.pointers
|
||||||
|
|||||||
@@ -285,7 +285,6 @@ pub fn openxr_run(show_by_default: bool, headless: bool) -> Result<(), BackendEr
|
|||||||
overlays.show_hide(&mut app);
|
overlays.show_hide(&mut app);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
if app
|
if app
|
||||||
.input_state
|
.input_state
|
||||||
.pointers
|
.pointers
|
||||||
@@ -356,7 +355,6 @@ pub fn openxr_run(show_by_default: bool, headless: bool) -> Result<(), BackendEr
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
if let Err(e) =
|
if let Err(e) =
|
||||||
crate::ipc::events::tick_events::<OpenXrOverlayData>(&mut app, &mut overlays)
|
crate::ipc::events::tick_events::<OpenXrOverlayData>(&mut app, &mut overlays)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
use wayvr_ipc::packet_server;
|
use wayvr_ipc::packet_server;
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
use crate::backend::wayvr::{self, WvrServerState};
|
use crate::backend::wayvr::{self, WvrServerState};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@@ -13,7 +12,6 @@ use crate::{
|
|||||||
windowing::{OverlaySelector, manager::OverlayWindowManager},
|
windowing::{OverlaySelector, manager::OverlayWindowManager},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
fn process_tick_tasks(
|
fn process_tick_tasks(
|
||||||
tick_tasks: Vec<backend::wayvr::TickTask>,
|
tick_tasks: Vec<backend::wayvr::TickTask>,
|
||||||
server_state: &mut WvrServerState,
|
server_state: &mut WvrServerState,
|
||||||
@@ -41,7 +39,6 @@ where
|
|||||||
{
|
{
|
||||||
while let Some(signal) = app.wayvr_signals.read() {
|
while let Some(signal) = app.wayvr_signals.read() {
|
||||||
match signal {
|
match signal {
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
WayVRSignal::BroadcastStateChanged(packet) => {
|
WayVRSignal::BroadcastStateChanged(packet) => {
|
||||||
app.ipc_server
|
app.ipc_server
|
||||||
.broadcast(packet_server::PacketServer::WvrStateChanged(packet));
|
.broadcast(packet_server::PacketServer::WvrStateChanged(packet));
|
||||||
@@ -66,21 +63,9 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
let tick_tasks = WvrServerState::tick_events(app)?;
|
||||||
{
|
if let Some(wayvr_server) = app.wvr_server.as_mut() {
|
||||||
let tick_tasks = WvrServerState::tick_events(app)?;
|
process_tick_tasks(tick_tasks, wayvr_server);
|
||||||
if let Some(wayvr_server) = app.wvr_server.as_mut() {
|
|
||||||
process_tick_tasks(tick_tasks, wayvr_server);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(feature = "wayvr"))]
|
|
||||||
{
|
|
||||||
use super::ipc_server::TickParams;
|
|
||||||
app.ipc_server.tick(&mut TickParams {
|
|
||||||
input_state: &app.input_state,
|
|
||||||
signals: &app.wayvr_signals,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#[cfg(feature = "wayvr")]
|
|
||||||
use crate::backend::wayvr::{self, WvrServerState};
|
use crate::backend::wayvr::{self, WvrServerState};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@@ -75,9 +74,7 @@ fn read_payload(conn: &mut local_socket::Stream, size: u32) -> Option<Payload> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct TickParams<'a> {
|
pub struct TickParams<'a> {
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
pub wvr_server: &'a mut WvrServerState,
|
pub wvr_server: &'a mut WvrServerState,
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
pub tasks: &'a mut Vec<wayvr::TickTask>,
|
pub tasks: &'a mut Vec<wayvr::TickTask>,
|
||||||
pub signals: &'a SyncEventQueue<WayVRSignal>,
|
pub signals: &'a SyncEventQueue<WayVRSignal>,
|
||||||
pub input_state: &'a InputState,
|
pub input_state: &'a InputState,
|
||||||
@@ -182,7 +179,6 @@ impl Connection {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
fn handle_wvr_window_list(
|
fn handle_wvr_window_list(
|
||||||
&mut self,
|
&mut self,
|
||||||
params: &mut TickParams,
|
params: &mut TickParams,
|
||||||
@@ -212,7 +208,6 @@ impl Connection {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
fn handle_wvr_window_set_visible(
|
fn handle_wvr_window_set_visible(
|
||||||
params: &mut TickParams,
|
params: &mut TickParams,
|
||||||
handle: packet_server::WvrWindowHandle,
|
handle: packet_server::WvrWindowHandle,
|
||||||
@@ -228,7 +223,6 @@ impl Connection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
fn handle_wvr_process_launch(
|
fn handle_wvr_process_launch(
|
||||||
&mut self,
|
&mut self,
|
||||||
params: &mut TickParams,
|
params: &mut TickParams,
|
||||||
@@ -260,7 +254,6 @@ impl Connection {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
fn handle_wvr_process_list(
|
fn handle_wvr_process_list(
|
||||||
&mut self,
|
&mut self,
|
||||||
params: &TickParams,
|
params: &TickParams,
|
||||||
@@ -296,7 +289,6 @@ impl Connection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This request doesn't return anything to the client
|
// This request doesn't return anything to the client
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
fn handle_wvr_process_terminate(
|
fn handle_wvr_process_terminate(
|
||||||
params: &mut TickParams,
|
params: &mut TickParams,
|
||||||
process_handle: packet_server::WvrProcessHandle,
|
process_handle: packet_server::WvrProcessHandle,
|
||||||
@@ -313,7 +305,6 @@ impl Connection {
|
|||||||
process.kill(KillSignal::Term);
|
process.kill(KillSignal::Term);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
fn handle_wvr_process_get(
|
fn handle_wvr_process_get(
|
||||||
&mut self,
|
&mut self,
|
||||||
params: &TickParams,
|
params: &TickParams,
|
||||||
@@ -402,27 +393,21 @@ impl Connection {
|
|||||||
self.handle_wlx_input_state(params, serial)?;
|
self.handle_wlx_input_state(params, serial)?;
|
||||||
}
|
}
|
||||||
PacketClient::WvrWindowList(serial) => {
|
PacketClient::WvrWindowList(serial) => {
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
self.handle_wvr_window_list(params, serial)?;
|
self.handle_wvr_window_list(params, serial)?;
|
||||||
}
|
}
|
||||||
PacketClient::WvrWindowSetVisible(window_handle, visible) => {
|
PacketClient::WvrWindowSetVisible(window_handle, visible) => {
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
Self::handle_wvr_window_set_visible(params, window_handle, visible);
|
Self::handle_wvr_window_set_visible(params, window_handle, visible);
|
||||||
}
|
}
|
||||||
PacketClient::WvrProcessGet(serial, process_handle) => {
|
PacketClient::WvrProcessGet(serial, process_handle) => {
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
self.handle_wvr_process_get(params, serial, process_handle)?;
|
self.handle_wvr_process_get(params, serial, process_handle)?;
|
||||||
}
|
}
|
||||||
PacketClient::WvrProcessList(serial) => {
|
PacketClient::WvrProcessList(serial) => {
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
self.handle_wvr_process_list(params, serial)?;
|
self.handle_wvr_process_list(params, serial)?;
|
||||||
}
|
}
|
||||||
PacketClient::WvrProcessLaunch(serial, packet_params) => {
|
PacketClient::WvrProcessLaunch(serial, packet_params) => {
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
self.handle_wvr_process_launch(params, serial, packet_params)?;
|
self.handle_wvr_process_launch(params, serial, packet_params)?;
|
||||||
}
|
}
|
||||||
PacketClient::WvrProcessTerminate(process_handle) => {
|
PacketClient::WvrProcessTerminate(process_handle) => {
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
Self::handle_wvr_process_terminate(params, process_handle);
|
Self::handle_wvr_process_terminate(params, process_handle);
|
||||||
}
|
}
|
||||||
PacketClient::WlxDeviceHaptics(device, haptics_params) => {
|
PacketClient::WlxDeviceHaptics(device, haptics_params) => {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub enum WayVRSignal {
|
pub enum WayVRSignal {
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
BroadcastStateChanged(wayvr_ipc::packet_server::WvrStateChanged),
|
BroadcastStateChanged(wayvr_ipc::packet_server::WvrStateChanged),
|
||||||
DeviceHaptics(usize, crate::backend::input::Haptics),
|
DeviceHaptics(usize, crate::backend::input::Haptics),
|
||||||
DropOverlay(crate::windowing::OverlayID),
|
DropOverlay(crate::windowing::OverlayID),
|
||||||
|
|||||||
@@ -6,6 +6,4 @@ pub mod keyboard;
|
|||||||
pub mod screen;
|
pub mod screen;
|
||||||
pub mod toast;
|
pub mod toast;
|
||||||
pub mod watch;
|
pub mod watch;
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
pub mod wayvr;
|
pub mod wayvr;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ use glam::Affine3A;
|
|||||||
use idmap::IdMap;
|
use idmap::IdMap;
|
||||||
use smallvec::{SmallVec, smallvec};
|
use smallvec::{SmallVec, smallvec};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
use wgui::log::LogErr;
|
use wgui::log::LogErr;
|
||||||
use wgui::{
|
use wgui::{
|
||||||
drawing, font_config::WguiFontConfig, gfx::WGfx, globals::WguiGlobals, parser::parse_color_hex,
|
drawing, font_config::WguiFontConfig, gfx::WGfx, globals::WguiGlobals, parser::parse_color_hex,
|
||||||
@@ -16,7 +15,6 @@ use wlx_common::{
|
|||||||
overlays::{ToastDisplayMethod, ToastTopic},
|
overlays::{ToastDisplayMethod, ToastTopic},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
use crate::backend::wayvr::WvrServerState;
|
use crate::backend::wayvr::WvrServerState;
|
||||||
#[cfg(feature = "osc")]
|
#[cfg(feature = "osc")]
|
||||||
use crate::subsystem::osc::OscSender;
|
use crate::subsystem::osc::OscSender;
|
||||||
@@ -62,7 +60,6 @@ pub struct AppState {
|
|||||||
#[cfg(feature = "osc")]
|
#[cfg(feature = "osc")]
|
||||||
pub osc_sender: Option<OscSender>,
|
pub osc_sender: Option<OscSender>,
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
pub wvr_server: Option<WvrServerState>,
|
pub wvr_server: Option<WvrServerState>,
|
||||||
|
|
||||||
#[cfg(feature = "openxr")]
|
#[cfg(feature = "openxr")]
|
||||||
@@ -82,7 +79,6 @@ impl AppState {
|
|||||||
let session = AppSession::load();
|
let session = AppSession::load();
|
||||||
let wvr_signals = SyncEventQueue::new();
|
let wvr_signals = SyncEventQueue::new();
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
let wvr_server = WvrServerState::new(gfx.clone(), &gfx_extras, wvr_signals.clone())
|
let wvr_server = WvrServerState::new(gfx.clone(), &gfx_extras, wvr_signals.clone())
|
||||||
.log_err("Could not initialize WayVR Server")
|
.log_err("Could not initialize WayVR Server")
|
||||||
.ok();
|
.ok();
|
||||||
@@ -164,7 +160,6 @@ impl AppState {
|
|||||||
#[cfg(feature = "osc")]
|
#[cfg(feature = "osc")]
|
||||||
osc_sender,
|
osc_sender,
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
wvr_server,
|
wvr_server,
|
||||||
|
|
||||||
#[cfg(feature = "openxr")]
|
#[cfg(feature = "openxr")]
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ use crate::{backend::wayvr::WvrServerState, subsystem::hid::XkbKeymap};
|
|||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||||
pub enum KeyboardFocus {
|
pub enum KeyboardFocus {
|
||||||
PhysicalScreen,
|
PhysicalScreen,
|
||||||
|
|
||||||
#[allow(dead_code)] // Not available if "wayvr" feature is disabled
|
|
||||||
WayVR, // (wayland window id data is handled internally),
|
WayVR, // (wayland window id data is handled internally),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,9 +31,7 @@ impl HidWrapper {
|
|||||||
) {
|
) {
|
||||||
match self.keyboard_focus {
|
match self.keyboard_focus {
|
||||||
KeyboardFocus::PhysicalScreen => self.inner.send_key(key, down),
|
KeyboardFocus::PhysicalScreen => self.inner.send_key(key, down),
|
||||||
KeyboardFocus::WayVR =>
|
KeyboardFocus::WayVR => {
|
||||||
{
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
if let Some(wvr_server) = wvr_server {
|
if let Some(wvr_server) = wvr_server {
|
||||||
wvr_server.send_key(key as u32, down);
|
wvr_server.send_key(key as u32, down);
|
||||||
}
|
}
|
||||||
@@ -44,7 +40,6 @@ impl HidWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn keymap_changed(&mut self, wvr_server: Option<&mut WvrServerState>, keymap: &XkbKeymap) {
|
pub fn keymap_changed(&mut self, wvr_server: Option<&mut WvrServerState>, keymap: &XkbKeymap) {
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
if let Some(wvr_server) = wvr_server {
|
if let Some(wvr_server) = wvr_server {
|
||||||
let _ = wvr_server
|
let _ = wvr_server
|
||||||
.set_keymap(&keymap.inner)
|
.set_keymap(&keymap.inner)
|
||||||
@@ -62,9 +57,7 @@ impl HidWrapper {
|
|||||||
pub fn set_modifiers_routed(&mut self, wvr_server: Option<&mut WvrServerState>, mods: u8) {
|
pub fn set_modifiers_routed(&mut self, wvr_server: Option<&mut WvrServerState>, mods: u8) {
|
||||||
match self.keyboard_focus {
|
match self.keyboard_focus {
|
||||||
KeyboardFocus::PhysicalScreen => self.inner.set_modifiers(mods),
|
KeyboardFocus::PhysicalScreen => self.inner.set_modifiers(mods),
|
||||||
KeyboardFocus::WayVR =>
|
KeyboardFocus::WayVR => {
|
||||||
{
|
|
||||||
#[cfg(feature = "wayvr")]
|
|
||||||
if let Some(wvr_server) = wvr_server {
|
if let Some(wvr_server) = wvr_server {
|
||||||
wvr_server.set_modifiers(mods);
|
wvr_server.set_modifiers(mods);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user