Skip to content

Commit 1f298da

Browse files
committed
wayland: Use GlobalList::destroy to destroy the registry
Smithay/wayland-rs#886
1 parent 7140e44 commit 1f298da

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ memmap2 = { version = "0.9.0", optional = true }
7070
wayland-backend = { version = "0.3.0", optional = true, features = [
7171
"client_system",
7272
] }
73-
wayland-client = { version = "0.31.12", optional = true }
73+
wayland-client = { version = "0.31.14", optional = true }
7474
wayland-sys = { version = "0.31.0", optional = true }
7575
# X11
7676
as-raw-xcb-connection = { version = "1.0.0", optional = true }

src/backends/wayland/mod.rs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::{
1111
use wayland_client::{
1212
backend::{Backend, ObjectId},
1313
globals::{registry_queue_init, GlobalListContents},
14-
protocol::{wl_fixes, wl_registry, wl_shm, wl_surface},
14+
protocol::{wl_registry, wl_shm, wl_surface},
1515
Connection, Dispatch, EventQueue, Proxy, QueueHandle,
1616
};
1717

@@ -61,13 +61,7 @@ impl<D: HasDisplayHandle + ?Sized> ContextInterface<D> for Arc<WaylandDisplayImp
6161

6262
// If `wl_fixes` is supported, destroy registry using it.
6363
// We don't need the registry anymore.
64-
if let Ok(fixes) = globals.bind::<wl_fixes::WlFixes, _, ()>(&qh, 1..=1, ()) {
65-
fixes.destroy_registry(globals.registry());
66-
conn.backend()
67-
.destroy_object(&globals.registry().id())
68-
.unwrap();
69-
fixes.destroy();
70-
}
64+
globals.destroy();
7165

7266
Ok(Arc::new(WaylandDisplayImpl {
7367
conn: Some(conn),
@@ -350,15 +344,3 @@ impl Dispatch<wl_shm::WlShm, ()> for State {
350344
) {
351345
}
352346
}
353-
354-
impl Dispatch<wl_fixes::WlFixes, ()> for State {
355-
fn event(
356-
_: &mut State,
357-
_: &wl_fixes::WlFixes,
358-
_: wl_fixes::Event,
359-
_: &(),
360-
_: &Connection,
361-
_: &QueueHandle<State>,
362-
) {
363-
}
364-
}

0 commit comments

Comments
 (0)