mirror of
https://github.com/wez/wezterm.git
synced 2024-08-17 02:00:25 +03:00
Improve error messages for set_cursor
This commit is contained in:
parent
2dd2a541ce
commit
b23a424e21
@ -906,20 +906,26 @@ 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(
|
||||
&conn.connection,
|
||||
match cursor {
|
||||
MouseCursor::Arrow => CursorIcon::Default,
|
||||
MouseCursor::Hand => CursorIcon::Pointer,
|
||||
MouseCursor::SizeUpDown => CursorIcon::NsResize,
|
||||
MouseCursor::SizeLeftRight => CursorIcon::EwResize,
|
||||
MouseCursor::Text => CursorIcon::Text,
|
||||
},
|
||||
),
|
||||
None => pointer.hide_cursor(),
|
||||
} {
|
||||
log::error!("set_cursor: {}", err);
|
||||
match cursor {
|
||||
Some(cursor) => {
|
||||
if let Err(err) = pointer.set_cursor(
|
||||
&conn.connection,
|
||||
match cursor {
|
||||
MouseCursor::Arrow => CursorIcon::Default,
|
||||
MouseCursor::Hand => CursorIcon::Pointer,
|
||||
MouseCursor::SizeUpDown => CursorIcon::NsResize,
|
||||
MouseCursor::SizeLeftRight => CursorIcon::EwResize,
|
||||
MouseCursor::Text => CursorIcon::Text,
|
||||
},
|
||||
) {
|
||||
log::error!("set_cursor: {}", err);
|
||||
}
|
||||
}
|
||||
None => {
|
||||
if let Err(err) = pointer.hide_cursor() {
|
||||
log::error!("hide_cursor: {}", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user