aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/event.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/event.rs b/src/event.rs
index fd33bfb3..c385e289 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -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;
+ },
_ => (),
}
}