aboutsummaryrefslogtreecommitdiff
path: root/src/window.rs
diff options
context:
space:
mode:
authorTuomas Siipola <siiptuo@kapsi.fi>2017-07-28 19:02:56 +0300
committerJoe Wilm <jwilm@users.noreply.github.com>2017-07-28 09:02:56 -0700
commite33168eff717683fbaf01b52dbf7b4d574a52157 (patch)
tree0b46e12583cbb34ef3fe9c0d513b32a953281334 /src/window.rs
parent11e67d90348b6a176b6b6b008b905e86ccf20cc0 (diff)
downloadalacritty-e33168eff717683fbaf01b52dbf7b4d574a52157.tar.gz
alacritty-e33168eff717683fbaf01b52dbf7b4d574a52157.zip
Don't panic when setting cursor visibility fails (#683)
Currently setting cursor visibility always fails on Wayland. It shouldn't be a critical error on any platform.
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/window.rs b/src/window.rs
index 8126454d..342e9b7c 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -276,11 +276,13 @@ impl Window {
pub fn set_cursor_visible(&mut self, visible: bool) {
if visible != self.cursor_visible {
self.cursor_visible = visible;
- self.window.set_cursor_state(if visible {
+ if let Err(err) = self.window.set_cursor_state(if visible {
CursorState::Normal
} else {
CursorState::Hide
- }).unwrap();
+ }) {
+ warn!("Failed to set cursor visibility: {}", err);
+ }
}
}