1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 22:42:48 +03:00

wayland: improve error when no seats have pointers

I don't know why that might be the case, but this error is better
than the unwrap.

refs: https://github.com/wez/wezterm/issues/3050
This commit is contained in:
Wez Furlong 2023-02-04 07:44:47 -07:00
parent b9739a24d1
commit 8ffcf546cf
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -128,6 +128,8 @@ impl WaylandConnection {
}
}
}
let pointer =
pointer.ok_or_else(|| anyhow::anyhow!("no seats have an available pointer"))?;
let seat_listener;
{
@ -188,7 +190,7 @@ impl WaylandConnection {
next_window_id: AtomicUsize::new(1),
windows: RefCell::new(HashMap::new()),
event_q: RefCell::new(event_q),
pointer: RefCell::new(pointer.unwrap()),
pointer: RefCell::new(pointer),
seat_listener,
mem_pool: RefCell::new(mem_pool),
gl_connection: RefCell::new(None),