diff options
author | Dustin <dustin1114@gmail.com> | 2017-10-22 14:34:31 -0400 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-10-22 11:34:31 -0700 |
commit | 16c047b08ab1f844f9590efb0d5212d6e9924daf (patch) | |
tree | f5750681e59eaac3c0f8357f4729b23a39215a36 | |
parent | bfdd7b0062fb8efb0789690ba91ea9c555f64014 (diff) | |
download | alacritty-16c047b08ab1f844f9590efb0d5212d6e9924daf.tar.gz alacritty-16c047b08ab1f844f9590efb0d5212d6e9924daf.zip |
Change cursor from pointer to text (#778)
It seems that (as a rule) terminal emulators use the text mouse cursor rather
than the pointer that is used now. This commit changes the cursor to
using winit's built-in configuration function.
-rw-r--r-- | src/window.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/window.rs b/src/window.rs index a50daf87..34a9c780 100644 --- a/src/window.rs +++ b/src/window.rs @@ -16,7 +16,7 @@ use std::fmt::{self, Display}; use std::ops::Deref; use gl; -use glutin::{self, EventsLoop, WindowBuilder, Event, CursorState, ControlFlow, ContextBuilder}; +use glutin::{self, EventsLoop, WindowBuilder, Event, MouseCursor, CursorState, ControlFlow, ContextBuilder}; use glutin::GlContext; /// Window errors @@ -195,6 +195,9 @@ impl Window { .with_vsync(true); let window = ::glutin::GlWindow::new(window, context, &event_loop)?; + // Text cursor + window.set_cursor(MouseCursor::Text); + // Set OpenGL symbol loader gl::load_with(|symbol| window.get_proc_address(symbol) as *const _); |