1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00

Fix cursor visibility when window lost focus

This commit is contained in:
Tuomas Siipola 2017-02-22 22:59:01 +02:00 committed by Joe Wilm
parent 3cc27a4d76
commit 2d89f79a29

View file

@ -224,7 +224,9 @@ impl<N: Notify> Processor<N> {
processor.ctx.terminal.dirty = true;
},
glutin::Event::KeyboardInput(state, _code, key, mods, string) => {
*hide_cursor = true;
if state == ElementState::Pressed {
*hide_cursor = true;
}
processor.process_key(state, key, mods, string);
},
glutin::Event::MouseInput(state, button) => {
@ -252,6 +254,9 @@ impl<N: Notify> Processor<N> {
glutin::Event::Awakened => {
processor.ctx.terminal.dirty = true;
},
glutin::Event::Focused(false) => {
*hide_cursor = false;
},
_ => (),
}
}