Skip to content

Commit

Permalink
refactor: remove xwayland (we can always just use the old code)
Browse files Browse the repository at this point in the history
  • Loading branch information
technobaboo committed Jun 11, 2024
1 parent 99eb0ea commit 9f0043f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 324 deletions.
5 changes: 0 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use crate::objects::input::mouse_pointer::MousePointer;
use crate::objects::input::sk_controller::SkController;
use crate::objects::input::sk_hand::SkHand;
use crate::objects::play_space::PlaySpace;
use crate::wayland::X_DISPLAY;

use self::core::eventloop::EventLoop;
use clap::Parser;
Expand Down Expand Up @@ -402,10 +401,6 @@ fn run_client(
if let Some(wayland_socket) = wayland.socket_name.as_ref() {
command.env("WAYLAND_DISPLAY", wayland_socket);
}
command.env(
"DISPLAY",
format!(":{}", X_DISPLAY.get().cloned().unwrap_or_default()),
);
command.env("GDK_BACKEND", "wayland");
command.env("QT_QPA_PLATFORM", "wayland");
command.env("MOZ_ENABLE_WAYLAND", "1");
Expand Down
23 changes: 0 additions & 23 deletions src/wayland/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ mod surface;
mod drm;
mod utils;
mod xdg_shell;
#[cfg(feature = "xwayland_rootful")]
pub mod xwayland_rootful;
#[cfg(feature = "xwayland_rootful")]
use self::xwayland_rootful::X11Lock;
#[cfg(feature = "xwayland_rootful")]
use crate::wayland::xwayland_rootful::start_xwayland;
#[cfg(feature = "xwayland_rootless")]
pub mod xwayland_rootless;
#[cfg(feature = "xwayland_rootless")]
use crate::wayland::xwayland_rootless::start_xwayland;

use self::{state::WaylandState, surface::CORE_SURFACES};
use crate::{core::task, wayland::state::ClientState};
Expand Down Expand Up @@ -48,7 +38,6 @@ use tokio::{
};
use tracing::{debug_span, info, instrument};

pub static X_DISPLAY: OnceCell<u32> = OnceCell::new();
pub static WAYLAND_DISPLAY: OnceCell<String> = OnceCell::new();

struct EGLRawHandles {
Expand Down Expand Up @@ -96,10 +85,6 @@ pub struct Wayland {
renderer: GlesRenderer,
output: Output,
dmabuf_rx: UnboundedReceiver<(Dmabuf, Option<dmabuf::ImportNotifier>)>,
#[cfg(feature = "xwayland_rootful")]
pub x_lock: X11Lock,
#[cfg(feature = "xwayland_rootless")]
xwayland_join_handle: JoinHandle<Result<()>>,
}
impl Wayland {
pub fn new() -> Result<Self> {
Expand Down Expand Up @@ -129,13 +114,9 @@ impl Wayland {
if let Some(socket_name) = &socket_name {
let _ = WAYLAND_DISPLAY.set(socket_name.clone());
}
#[cfg(feature = "xwayland_rootful")]
let x_display = start_xwayland(socket.as_raw_fd())?;
info!(socket_name, "Wayland active");

let join_handle = Wayland::start_loop(display.clone(), socket, wayland_state)?;
#[cfg(feature = "xwayland_rootless")]
let xwayland_join_handle = task::new(|| "xwayland", start_xwayland(display_handle))?;

Ok(Wayland {
display,
Expand All @@ -144,10 +125,6 @@ impl Wayland {
renderer,
output,
dmabuf_rx,
#[cfg(feature = "xwayland_rootful")]
x_lock: x_display,
#[cfg(feature = "xwayland_rootless")]
xwayland_join_handle,
})
}

Expand Down
267 changes: 0 additions & 267 deletions src/wayland/xwayland_rootful.rs

This file was deleted.

29 changes: 0 additions & 29 deletions src/wayland/xwayland_rootless.rs

This file was deleted.

0 comments on commit 9f0043f

Please sign in to comment.