diff options
author | Tuomas Siipola <siiptuo@kapsi.fi> | 2017-07-28 19:02:56 +0300 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-07-28 09:02:56 -0700 |
commit | e33168eff717683fbaf01b52dbf7b4d574a52157 (patch) | |
tree | 0b46e12583cbb34ef3fe9c0d513b32a953281334 | |
parent | 11e67d90348b6a176b6b6b008b905e86ccf20cc0 (diff) | |
download | alacritty-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.
-rw-r--r-- | src/window.rs | 6 |
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); + } } } |