Skip to content

Commit

Permalink
update wayrs
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxVerevkin committed Dec 9, 2023
1 parent ea0d050 commit 663c70c
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 59 deletions.
76 changes: 33 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ serde_json = "1"
serde = { version = "1", features = ["derive"] }
signal-hook = { version = "0.3", default-features = false }
toml = { version = "0.8", default-features = false, features = ["parse"] }
wayrs-client = "0.12"
wayrs-protocols = { version = "0.12", features = ["wlr-layer-shell-unstable-v1", "viewporter", "fractional-scale-v1"] }
wayrs-utils = { version = "0.12", features = ["cursor", "shm_alloc", "seats"] }
clap = { version = "4.3.23", default-features = false, features = ["derive", "std", "help"] }
libc = "0.2.147"
wayrs-client = "1.0"
wayrs-protocols = { version = "0.13", features = ["wlr-layer-shell-unstable-v1", "viewporter", "fractional-scale-v1"] }
wayrs-utils = { version = "0.13", features = ["cursor", "shm_alloc", "seats"] }
clap = { version = "4.3", default-features = false, features = ["derive", "std", "help"] }
libc = "0.2"

[profile.release]
lto = "fat"
Expand Down
4 changes: 2 additions & 2 deletions src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
20 changes: 11 additions & 9 deletions src/wm_info_provider/river.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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,
},
})
Expand Down

0 comments on commit 663c70c

Please sign in to comment.