Fix cursor visibility when window lost focus
This commit is contained in:
parent
3cc27a4d76
commit
2d89f79a29
|
@ -224,7 +224,9 @@ impl<N: Notify> Processor<N> {
|
||||||
processor.ctx.terminal.dirty = true;
|
processor.ctx.terminal.dirty = true;
|
||||||
},
|
},
|
||||||
glutin::Event::KeyboardInput(state, _code, key, mods, string) => {
|
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);
|
processor.process_key(state, key, mods, string);
|
||||||
},
|
},
|
||||||
glutin::Event::MouseInput(state, button) => {
|
glutin::Event::MouseInput(state, button) => {
|
||||||
|
@ -252,6 +254,9 @@ impl<N: Notify> Processor<N> {
|
||||||
glutin::Event::Awakened => {
|
glutin::Event::Awakened => {
|
||||||
processor.ctx.terminal.dirty = true;
|
processor.ctx.terminal.dirty = true;
|
||||||
},
|
},
|
||||||
|
glutin::Event::Focused(false) => {
|
||||||
|
*hide_cursor = false;
|
||||||
|
},
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue