mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
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.
This commit is contained in:
parent
bfdd7b0062
commit
16c047b08a
1 changed files with 4 additions and 1 deletions
|
@ -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 _);
|
||||
|
||||
|
|
Loading…
Reference in a new issue