diff options
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); + } _ => (), } } |