diff options
author | Felippe da Motta Raposo <raposo.felippe@gmail.com> | 2018-06-23 03:13:19 -0700 |
---|---|---|
committer | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-06-23 10:13:19 +0000 |
commit | caf4580daa31c4c7249331b32826124d2b2b4143 (patch) | |
tree | 0e7be90f3e1724c8b8065086f9aa77cf92addd6d | |
parent | 128c25ee8b31473a6514e9bcaa59d8f9e66ea3a7 (diff) | |
download | alacritty-caf4580daa31c4c7249331b32826124d2b2b4143.tar.gz alacritty-caf4580daa31c4c7249331b32826124d2b2b4143.zip |
Ignore mouse input if window is unfocused
-rw-r--r-- | src/event.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/event.rs b/src/event.rs index f592da5c..cff013e3 100644 --- a/src/event.rs +++ b/src/event.rs @@ -301,9 +301,11 @@ impl<N: Notify> Processor<N> { processor.received_char(c); }, MouseInput { state, button, modifiers, .. } => { - *hide_cursor = false; - processor.mouse_input(state, button, modifiers); - processor.ctx.terminal.dirty = true; + if *window_is_focused { + *hide_cursor = false; + processor.mouse_input(state, button, modifiers); + processor.ctx.terminal.dirty = true; + } }, CursorMoved { position: (x, y), modifiers, .. } => { let x = x as i32; |