Skip to content

Commit

Permalink
Merge pull request #19 from pop-os/update-deps
Browse files Browse the repository at this point in the history
Update `wayland-rs` to 0.31, `smithay-client-toolkit`, etc.
  • Loading branch information
ids1024 authored Oct 2, 2023
2 parents f6aec35 + bf7958d commit 5c03417
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 33 deletions.
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ categories = ["gui", "api-bindings"]
readme = "README.md"

[dependencies]
wayland-scanner = "0.30.0"
wayland-backend = "0.1.0"
wayland-protocols = "0.30.0"
wayland-client = { version = "0.30.1", optional = true }
wayland-server = { version = "0.30.0", optional = true }
bitflags = "1.0"
wayland-scanner = "0.31.0"
wayland-backend = "0.3.1"
wayland-protocols = "0.31.0"
wayland-client = { version = "0.31.1", optional = true }
wayland-server = { version = "0.31.0", optional = true }
bitflags = "2.4"

[dev-dependencies]
async-channel = "1.7.1"
cascade = "1"
env_logger = "0.9.1"
env_logger = "0.10.0"
png = "0.17.5"
smithay = { git = "https://github.com/Smithay/smithay", rev = "c35bc3e", default-features = false, features = ["backend_egl", "renderer_gl", "renderer_multi"]}
wayland-backend = { version = "0.1.0", features = ["client_system"] }
smithay = { git = "https://github.com/Smithay/smithay", rev = "298a3ec", default-features = false, features = ["backend_egl", "renderer_gl", "renderer_multi"]}
wayland-backend = { version = "0.3.1", features = ["client_system"] }
memfd = "0.6.1"

[features]
Expand Down
22 changes: 11 additions & 11 deletions client-toolkit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition = "2021"

[dependencies]
cosmic-protocols = { path = "../" }
sctk = { package = "smithay-client-toolkit", git = "https://github.com/smithay/client-toolkit", rev = "c9940f4" }
wayland-client = { version = "0.30.1" }
sctk = { package = "smithay-client-toolkit", git = "https://github.com/smithay/client-toolkit", rev = "dc8c4a0" }
wayland-client = { version = "0.31.1" }
smithay = { git = "https://github.com/Smithay/smithay", rev = "c35bc3e", default-features = false, features = ["backend_egl", "renderer_gl", "renderer_multi"], optional = true }

[build-dependencies]
Expand All @@ -15,17 +15,17 @@ gl_generator = { version = "0.14.0", optional = true }
[dev-dependencies]
futures = "0.3.24"
cascade = "1"
env_logger = "0.9.1"
gdk-pixbuf = "0.17.0"
glow = "0.11.2"
env_logger = "0.10.0"
gdk-pixbuf = "0.18.0"
glow = "0.12.0"
glutin = "0.30.0"
gtk4 = { version = "0.6.4", features = ["v4_6"] }
gdk4-wayland = { version = "0.6.3", features = ["wayland_crate", "v4_4", "egl"] }
iced = { version = "0.5.2", features = ["image"] }
nix = "0.25.0"
gtk4 = { version = "0.7.3", features = ["v4_6"] }
gdk4-wayland = { version = "0.7.2", features = ["wayland_crate", "v4_4", "egl"] }
iced = { version = "0.10.0", features = ["image"] }
nix = { version = "0.27.0", features = ["fs"] }
raw-window-handle = "0.5.0"
wayland-backend = { version = "0.1.0", features = ["client_system"] }
winit = "0.27.4"
wayland-backend = { version = "0.3.2", features = ["client_system"] }
winit = "0.28.0"

[features]
default = []
Expand Down
8 changes: 5 additions & 3 deletions client-toolkit/examples/iced-capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,11 @@ impl iced::Application for App {
}),
);
let output_subscription =
iced::subscription::run("output-img", output_img_stream.map(Message::Image));
let workspace_subscription =
iced::subscription::run("workspace-img", workspace_img_stream.map(Message::Image));
iced::subscription::run_with_id("output-img", output_img_stream.map(Message::Image));
let workspace_subscription = iced::subscription::run_with_id(
"workspace-img",
workspace_img_stream.map(Message::Image),
);
iced::Subscription::batch([output_subscription, workspace_subscription])
}
}
Expand Down
15 changes: 7 additions & 8 deletions examples/screenshot-export-dmabuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use smithay::{
},
drm::node::DrmNode,
renderer::{
gles2::{Gles2Renderer, Gles2Texture},
gles::GlesRenderer,
multigpu::{egl::EglGlesBackend, GpuManager},
Bind, ExportMem,
},
Expand Down Expand Up @@ -123,7 +123,7 @@ impl Dispatch<zcosmic_export_dmabuf_frame_v1::ZcosmicExportDmabufFrameV1, String
_: &Connection,
_: &QueueHandle<AppData>,
) {
let mut frame = app_data.frames.entry(output_name.clone()).or_default();
let frame = app_data.frames.entry(output_name.clone()).or_default();

match event {
zcosmic_export_dmabuf_frame_v1::Event::Device { ref node } => {
Expand Down Expand Up @@ -193,8 +193,7 @@ fn main() {
event_queue.blocking_dispatch(&mut app_data).unwrap();
}

let mut gpu_manager =
GpuManager::new(EglGlesBackend::<Gles2Renderer>::default(), None).unwrap();
let mut gpu_manager = GpuManager::new(EglGlesBackend::<GlesRenderer>::default()).unwrap();

for (k, v) in app_data.frames {
let mut builder = Dmabuf::builder(
Expand All @@ -214,15 +213,15 @@ fn main() {
let dmabuf = builder.build().unwrap();

let drm_node = v.node.as_ref().unwrap();
let mut renderer = gpu_manager
.renderer::<Gles2Texture>(drm_node, drm_node)
.unwrap();
let mut renderer = gpu_manager.single_renderer(drm_node).unwrap();
renderer.bind(dmabuf).unwrap();
let rectangle = Rectangle {
loc: Point::default(),
size: Size::from((v.width as i32, v.height as i32)),
};
let mapping = renderer.copy_framebuffer(rectangle).unwrap();
let mapping = renderer
.copy_framebuffer(rectangle, Fourcc::Argb8888)
.unwrap();
let data = renderer.map_texture(&mapping).unwrap();

let path = format!("{}.png", k);
Expand Down
4 changes: 2 additions & 2 deletions examples/screenshot-screencopy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{
collections::HashMap,
fs,
io::{self, Read, Seek, SeekFrom},
os::unix::io::AsRawFd,
os::unix::io::AsFd,
};
use wayland_client::{
protocol::{
Expand Down Expand Up @@ -188,7 +188,7 @@ impl Dispatch<zcosmic_screencopy_session_v1::ZcosmicScreencopySessionV1, String>
.set_len(size.0 as u64 * size.1 as u64 * 4)
.expect("Failed to resize memfd");
let pool = app_data.wl_shm.as_ref().unwrap().create_pool(
fd.as_raw_fd(),
fd.as_file().as_fd(),
(size.0 * size.1 * 4) as i32,
qh,
(),
Expand Down

0 comments on commit 5c03417

Please sign in to comment.