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:
parent
2dd2a541ce
commit
b23a424e21
@ -906,20 +906,26 @@ impl WaylandWindowInner {
|
|||||||
let state = conn.wayland_state.borrow_mut();
|
let state = conn.wayland_state.borrow_mut();
|
||||||
let pointer = RefMut::map(state, |s| s.pointer.as_mut().unwrap());
|
let pointer = RefMut::map(state, |s| s.pointer.as_mut().unwrap());
|
||||||
|
|
||||||
if let Err(err) = match cursor {
|
match cursor {
|
||||||
Some(cursor) => pointer.set_cursor(
|
Some(cursor) => {
|
||||||
&conn.connection,
|
if let Err(err) = pointer.set_cursor(
|
||||||
match cursor {
|
&conn.connection,
|
||||||
MouseCursor::Arrow => CursorIcon::Default,
|
match cursor {
|
||||||
MouseCursor::Hand => CursorIcon::Pointer,
|
MouseCursor::Arrow => CursorIcon::Default,
|
||||||
MouseCursor::SizeUpDown => CursorIcon::NsResize,
|
MouseCursor::Hand => CursorIcon::Pointer,
|
||||||
MouseCursor::SizeLeftRight => CursorIcon::EwResize,
|
MouseCursor::SizeUpDown => CursorIcon::NsResize,
|
||||||
MouseCursor::Text => CursorIcon::Text,
|
MouseCursor::SizeLeftRight => CursorIcon::EwResize,
|
||||||
},
|
MouseCursor::Text => CursorIcon::Text,
|
||||||
),
|
},
|
||||||
None => pointer.hide_cursor(),
|
) {
|
||||||
} {
|
log::error!("set_cursor: {}", err);
|
||||||
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