diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2023-12-09 13:20:07 +0200 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2023-12-09 13:20:07 +0200 |
| commit | 663c70cd52f4593a75d875a33803b78beec3eb81 (patch) | |
| tree | deb4827e4a02f1f369d552a30f4bbd6a88ed13ab /src | |
| parent | ea0d050a7af3dd13e812ed1f4287af0ee2ca4917 (diff) | |
| download | i3bar-mango-663c70cd52f4593a75d875a33803b78beec3eb81.tar.gz | |
update wayrs
Diffstat (limited to 'src')
| -rw-r--r-- | src/protocol.rs | 4 | ||||
| -rw-r--r-- | src/wm_info_provider/river.rs | 20 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/protocol.rs b/src/protocol.rs index 5b30463..d8ac083 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -2,5 +2,5 @@ pub use wayrs_client::protocol::*; pub use wayrs_protocols::fractional_scale_v1::*; pub use wayrs_protocols::viewporter::*; pub use wayrs_protocols::wlr_layer_shell_unstable_v1::*; -wayrs_client::scanner::generate!("protocols/river-status-unstable-v1.xml"); -wayrs_client::scanner::generate!("protocols/river-control-unstable-v1.xml"); +wayrs_client::generate!("protocols/river-status-unstable-v1.xml"); +wayrs_client::generate!("protocols/river-control-unstable-v1.xml"); diff --git a/src/wm_info_provider/river.rs b/src/wm_info_provider/river.rs index 6c0993b..1d705c3 100644 --- a/src/wm_info_provider/river.rs +++ b/src/wm_info_provider/river.rs @@ -1,7 +1,8 @@ use std::ffi::CString; -use wayrs_client::{cstr, Connection}; -use wayrs_client::{global::*, EventCtx}; +use wayrs_client::global::*; +use wayrs_client::proxy::Proxy; +use wayrs_client::{cstr, Connection, EventCtx}; use super::*; use crate::state::State; @@ -34,19 +35,20 @@ impl RiverInfoProvider { globals: &Globals, config: &WmConfig, ) -> Option<Self> { - let status_manager = globals.bind(conn, 1..=4).ok()?; - let wl_seat: WlSeat = globals.bind(conn, ..).ok()?; // river supports just one seat + let status_manager: ZriverStatusManagerV1 = globals.bind(conn, 1..=4).ok()?; + let wl_seat: WlSeat = globals.bind(conn, ..=5).ok()?; // river supports just one seat + let seat_status = + status_manager.get_river_seat_status_with_cb(conn, wl_seat, seat_status_cb); + if wl_seat.version() >= 5 { + wl_seat.release(conn); + } Some(Self { status_manager, control: globals.bind(conn, 1).ok()?, output_statuses: Vec::new(), max_tag: config.river.max_tag, seat_status: SeatStatus { - _status: status_manager.get_river_seat_status_with_cb( - conn, - wl_seat, - seat_status_cb, - ), + _status: seat_status, mode: None, }, }) |
