From 5aa972c8bd95c3acbfdbf3864788a09aad324ba5 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Wed, 8 May 2024 21:16:10 -0700 Subject: [PATCH] WIP Ei protocol support --- Cargo.lock | 12 +++++++++++- Cargo.toml | 3 ++- src/main.rs | 3 +++ src/shell/seats.rs | 4 ++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 52af46b8..e9036d4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4149,6 +4149,15 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "reis" +version = "0.2.0" +source = "git+https://github.com/ids1024/reis#744cd8e82bee1c62c41668d228bec1949896765b" +dependencies = [ + "calloop 0.13.0", + "rustix 0.38.32", +] + [[package]] name = "renderdoc" version = "0.11.0" @@ -4558,7 +4567,7 @@ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smithay" version = "0.3.0" -source = "git+https://github.com/smithay//smithay?rev=64356be#64356be949f2ad5f70f601cd10255eafed2ce2ce" +source = "git+https://github.com/ids1024/smithay?branch=reis#ae1e5ae2509c494876957dcfb9764b9e38caef17" dependencies = [ "appendlist", "ash", @@ -4587,6 +4596,7 @@ dependencies = [ "pkg-config", "profiling", "rand", + "reis", "rustix 0.38.32", "scan_fmt", "scopeguard", diff --git a/Cargo.toml b/Cargo.toml index 91f6c0ad..57c5281f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -119,4 +119,5 @@ inherits = "release" lto = "fat" [patch."https://github.com/Smithay/smithay.git"] -smithay = {git = "https://github.com/smithay//smithay", rev = "64356be"} +# smithay = {git = "https://github.com/smithay//smithay", rev = "64356be"} +smithay = {git = "https://github.com/ids1024/smithay", branch = "reis"} diff --git a/src/main.rs b/src/main.rs index afa97eba..c31990d0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,6 +25,7 @@ pub mod dbus; #[cfg(feature = "debug")] pub mod debug; pub mod input; +pub mod libei; mod logger; pub mod session; pub mod shell; @@ -107,6 +108,8 @@ fn main() -> Result<()> { // init backend backend::init_backend_auto(&display, &mut event_loop, &mut state)?; + libei::listen_eis(&event_loop.handle()); + if let Err(err) = theme::watch_theme(event_loop.handle()) { warn!(?err, "Failed to watch theme"); } diff --git a/src/shell/seats.rs b/src/shell/seats.rs index f05cf457..559b6a0b 100644 --- a/src/shell/seats.rs +++ b/src/shell/seats.rs @@ -71,9 +71,13 @@ impl Seats { pub fn for_device(&self, device: &D) -> Option<&Seat> { self.iter().find(|seat| { + // XXX + /* let userdata = seat.user_data(); let devices = userdata.get::().unwrap(); devices.has_device(device) + */ + true }) } }