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