diff options
author | Aaron Hill <aa1ronham@gmail.com> | 2017-05-29 12:51:49 -0400 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-05-29 09:51:49 -0700 |
commit | 0321f3dcfb576763625a74392332e627ad5ece1b (patch) | |
tree | 1452c8d90e838173fea99a764665d0f494b36b40 /src/event.rs | |
parent | 81116fb8a4f91f28b5751827e7bcda22f6fcbaf0 (diff) | |
download | alacritty-0321f3dcfb576763625a74392332e627ad5ece1b.tar.gz alacritty-0321f3dcfb576763625a74392332e627ad5ece1b.zip |
Implement FocusIn/FocusOut reports (#589)
Implements sending FocusIn/FocusOut events, as defined at
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-FocusIn_FocusOut
Diffstat (limited to 'src/event.rs')
-rw-r--r-- | src/event.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/event.rs b/src/event.rs index 32b0e9d6..2d50234d 100644 --- a/src/event.rs +++ b/src/event.rs @@ -251,14 +251,19 @@ impl<N: Notify> Processor<N> { *hide_cursor = false; processor.on_mouse_wheel(scroll_delta, touch_phase); }, - glutin::Event::Focused(true) | glutin::Event::Refresh | glutin::Event::Awakened => { processor.ctx.terminal.dirty = true; }, - glutin::Event::Focused(false) => { - *hide_cursor = false; - }, + glutin::Event::Focused(is_focused) => { + if is_focused { + processor.ctx.terminal.dirty = true; + } else { + *hide_cursor = false; + } + + processor.on_focus_change(is_focused); + } _ => (), } } |