diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2022-09-23 10:14:05 +0300 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2022-09-23 10:18:24 +0300 |
| commit | a5baa2574ac0f8ff9ca8fbec0ff57145641ded47 (patch) | |
| tree | b93034333e4e89636d56b7f4ac074ce2d3861486 /src | |
| parent | 899e07fbaac6ed28ddbac054e7957e646a38937c (diff) | |
| download | i3bar-mango-a5baa2574ac0f8ff9ca8fbec0ff57145641ded47.tar.gz | |
update dependencies
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 5 | ||||
| -rw-r--r-- | src/river_protocols/control.rs | 8 | ||||
| -rw-r--r-- | src/river_protocols/status.rs | 8 | ||||
| -rw-r--r-- | src/state.rs | 2 |
4 files changed, 14 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs index 7f8dd38..fb52f07 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,6 +18,8 @@ mod tags; mod text; mod utils; +use std::os::unix::io::AsRawFd; + use smithay_client_toolkit::reexports::client::Connection; use tokio::io::{unix::AsyncFd, Interest}; @@ -32,12 +34,11 @@ async fn main() -> anyhow::Result<()> { let mut state = State::new(&conn, &mut event_queue); let async_fd = AsyncFd::with_interest( - event_queue.prepare_read()?.connection_fd(), + event_queue.prepare_read()?.connection_fd().as_raw_fd(), Interest::READABLE, )?; event_queue.roundtrip(&mut state)?; - event_queue.flush()?; loop { tokio::select! { diff --git a/src/river_protocols/control.rs b/src/river_protocols/control.rs index 0e7d7e4..525a9db 100644 --- a/src/river_protocols/control.rs +++ b/src/river_protocols/control.rs @@ -60,7 +60,7 @@ impl RiverControlState { for arg in args { control.add_argument(arg.into()); } - control.run_command(seat, qh, RiverCommandCallbackData {})?; + control.run_command(seat, qh, RiverCommandCallbackData {}); Ok(()) } } @@ -82,8 +82,10 @@ pub struct RiverCommandCallbackData { macro_rules! delegate_river_control { ($ty: ty) => { ::smithay_client_toolkit::reexports::client::delegate_dispatch!($ty: [ - $crate::river_protocols::control::protocol::zriver_control_v1::ZriverControlV1: ::smithay_client_toolkit::globals::GlobalData, - $crate::river_protocols::control::protocol::zriver_command_callback_v1::ZriverCommandCallbackV1: $crate::river_protocols::control::RiverCommandCallbackData, + $crate::river_protocols::control::protocol::zriver_control_v1::ZriverControlV1: ::smithay_client_toolkit::globals::GlobalData + ] => $crate::river_protocols::control::RiverControlState); + ::smithay_client_toolkit::reexports::client::delegate_dispatch!($ty: [ + $crate::river_protocols::control::protocol::zriver_command_callback_v1::ZriverCommandCallbackV1: $crate::river_protocols::control::RiverCommandCallbackData ] => $crate::river_protocols::control::RiverControlState); }; } diff --git a/src/river_protocols/status.rs b/src/river_protocols/status.rs index f19ac5f..079572a 100644 --- a/src/river_protocols/status.rs +++ b/src/river_protocols/status.rs @@ -66,7 +66,7 @@ impl RiverStatusState { + 'static, { let manager = self.status_manager()?; - let output_status = manager.get_river_output_status(output, qh, RiverStatusData {})?; + let output_status = manager.get_river_output_status(output, qh, RiverStatusData {}); let output_status = RiverOutputStatus(Arc::new(OutputStatusInner { status: output_status, @@ -124,8 +124,10 @@ pub struct RiverStatusData { macro_rules! delegate_river_status { ($ty: ty) => { ::smithay_client_toolkit::reexports::client::delegate_dispatch!($ty: [ - $crate::river_protocols::status::protocol::zriver_status_manager_v1::ZriverStatusManagerV1: ::smithay_client_toolkit::globals::GlobalData, - $crate::river_protocols::status::protocol::zriver_output_status_v1::ZriverOutputStatusV1: $crate::river_protocols::status::RiverStatusData, + $crate::river_protocols::status::protocol::zriver_status_manager_v1::ZriverStatusManagerV1: ::smithay_client_toolkit::globals::GlobalData + ] => $crate::river_protocols::status::RiverStatusState); + ::smithay_client_toolkit::reexports::client::delegate_dispatch!($ty: [ + $crate::river_protocols::status::protocol::zriver_output_status_v1::ZriverOutputStatusV1: $crate::river_protocols::status::RiverStatusData ] => $crate::river_protocols::status::RiverStatusState); }; } diff --git a/src/state.rs b/src/state.rs index f459681..3d5b2d4 100644 --- a/src/state.rs +++ b/src/state.rs @@ -189,7 +189,7 @@ impl OutputHandler for State { .size((0, height)) .anchor(Anchor::TOP | Anchor::LEFT | Anchor::RIGHT) .namespace("i3bar-river") - .map(qh, &mut self.layer_state, surface, Layer::Top) + .map(qh, &self.layer_state, surface, Layer::Top) .expect("layer surface creation"); let river_output_status = self.river_status_state.new_output_status(qh, &output).ok(); self.bars.push(Bar { |
