1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-11 14:25:57 +03:00

Improve error messages for set_cursor

This commit is contained in:
V 2024-04-08 06:35:07 +02:00 committed by Wez Furlong
parent 2dd2a541ce
commit b23a424e21
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -906,8 +906,9 @@ impl WaylandWindowInner {
let state = conn.wayland_state.borrow_mut();
let pointer = RefMut::map(state, |s| s.pointer.as_mut().unwrap());
if let Err(err) = match cursor {
Some(cursor) => pointer.set_cursor(
match cursor {
Some(cursor) => {
if let Err(err) = pointer.set_cursor(
&conn.connection,
match cursor {
MouseCursor::Arrow => CursorIcon::Default,
@ -916,12 +917,17 @@ impl WaylandWindowInner {
MouseCursor::SizeLeftRight => CursorIcon::EwResize,
MouseCursor::Text => CursorIcon::Text,
},
),
None => pointer.hide_cursor(),
} {
) {
log::error!("set_cursor: {}", err);
}
}
None => {
if let Err(err) = pointer.hide_cursor() {
log::error!("hide_cursor: {}", err)
}
}
}
}
fn invalidate(&mut self) {
if self.frame_callback.is_some() {