Skip to content

Commit

Permalink
update wayrs-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxVerevkin committed Feb 25, 2024
1 parent a68fe39 commit 5a8c66f
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 57 deletions.
95 changes: 48 additions & 47 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ serde = { version = "1", features = ["derive"] }
serde_yaml = "0.9"
wayrs-client = "1.0"
wayrs-protocols = { version = "0.13", features = ["wlr-layer-shell-unstable-v1"] }
wayrs-utils = { version = "0.13", features = ["shm_alloc", "seats", "keyboard"] }
wayrs-utils = { version = "0.14", features = ["shm_alloc", "seats", "keyboard"] }
smart-default = "0.7.0"
clap = { version = "4.3.0", default-features = false, features = ["std", "derive", "help", "usage"] }

Expand Down
21 changes: 12 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,18 @@ impl State {
let width_f = self.width as f64;
let height_f = self.height as f64;

let (buffer, canvas) = self.shm_alloc.alloc_buffer(
conn,
BufferSpec {
width: self.width * scale,
height: self.height * scale,
stride: self.width * 4 * scale,
format: wl_shm::Format::Argb8888,
},
);
let (buffer, canvas) = self
.shm_alloc
.alloc_buffer(
conn,
BufferSpec {
width: self.width * scale,
height: self.height * scale,
stride: self.width * 4 * scale,
format: wl_shm::Format::Argb8888,
},
)
.expect("could not allocate frame shm buffer");

let cairo_surf = unsafe {
cairo::ImageSurface::create_for_data_unsafe(
Expand Down

0 comments on commit 5a8c66f

Please sign in to comment.