aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/event.rs
diff options
context:
space:
mode:
authorDavid Hewitt <1939362+davidhewitt@users.noreply.github.com>2019-12-14 21:32:24 +0000
committerChristian Duerr <contact@christianduerr.com>2019-12-14 22:32:24 +0100
commit08a122574880d299181c59bec186c0f9e8bef77c (patch)
treec9dc6350869f89f08b35ca1e3a40a983bb1b53f1 /alacritty/src/event.rs
parentcb99fd4e4c16e8fe5c36e8be6062658842794ac3 (diff)
downloadr-alacritty-08a122574880d299181c59bec186c0f9e8bef77c.tar.gz
r-alacritty-08a122574880d299181c59bec186c0f9e8bef77c.tar.bz2
r-alacritty-08a122574880d299181c59bec186c0f9e8bef77c.zip
Send PTY resize messages through event loop
This allows us to clean up the Arcs on windows, as well as tidy up the code on unix a little too. Fixes #3086.
Diffstat (limited to 'alacritty/src/event.rs')
-rw-r--r--alacritty/src/event.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index 4cfc2152..4b1fe892 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -308,20 +308,18 @@ pub struct Processor<N> {
suppress_chars: bool,
modifiers: ModifiersState,
config: Config,
- pty_resize_handle: Box<dyn OnResize>,
message_buffer: MessageBuffer,
display: Display,
font_size: Size,
}
-impl<N: Notify> Processor<N> {
+impl<N: Notify + OnResize> Processor<N> {
/// Create a new event processor
///
/// Takes a writer which is expected to be hooked up to the write end of a
/// pty.
pub fn new(
notifier: N,
- pty_resize_handle: Box<dyn OnResize>,
message_buffer: MessageBuffer,
config: Config,
display: Display,
@@ -334,7 +332,6 @@ impl<N: Notify> Processor<N> {
modifiers: Default::default(),
font_size: config.font.size,
config,
- pty_resize_handle,
message_buffer,
display,
}
@@ -405,7 +402,7 @@ impl<N: Notify> Processor<N> {
if !display_update_pending.is_empty() {
self.display.handle_update(
&mut terminal,
- self.pty_resize_handle.as_mut(),
+ &mut self.notifier,
&self.message_buffer,
&self.config,
display_update_pending,