1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2025-11-06 22:44:18 -05:00

Update to winit/glutin EventLoop 2.0

This takes the latest glutin master to port Alacritty to the EventLoop
2.0 rework.

This changes a big part of the event loop handling by pushing the event
loop in a separate thread from the renderer and running both in
parallel.

Fixes #2796.
Fixes #2694.
Fixes #2643.
Fixes #2625.
Fixes #2618.
Fixes #2601.
Fixes #2564.
Fixes #2456.
Fixes #2438.
Fixes #2334.
Fixes #2254.
Fixes #2217.
Fixes #1789.
Fixes #1750.
Fixes #1125.
This commit is contained in:
Christian Duerr 2019-10-05 02:29:26 +02:00 committed by GitHub
parent b0c6fdff76
commit 729eef0c93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 2757 additions and 3033 deletions

View file

@ -1,5 +1,4 @@
#[macro_use]
extern crate serde_derive;
use serde::Deserialize;
use serde_json as json;
use std::fs::File;
@ -8,9 +7,9 @@ use std::path::Path;
use alacritty_terminal::ansi;
use alacritty_terminal::clipboard::Clipboard;
use alacritty_terminal::config::Config;
use alacritty_terminal::config::MockConfig;
use alacritty_terminal::event::{Event, EventListener};
use alacritty_terminal::index::Column;
use alacritty_terminal::message_bar::MessageBuffer;
use alacritty_terminal::term::cell::Cell;
use alacritty_terminal::term::SizeInfo;
use alacritty_terminal::Grid;
@ -81,6 +80,11 @@ struct RefConfig {
history_size: u32,
}
struct Mock;
impl EventListener for Mock {
fn send_event(&self, _event: Event) {}
}
fn ref_test(dir: &Path) {
let recording = read_u8(dir.join("alacritty.recording"));
let serialized_size = read_string(dir.join("size.json")).unwrap();
@ -91,10 +95,10 @@ fn ref_test(dir: &Path) {
let grid: Grid<Cell> = json::from_str(&serialized_grid).unwrap();
let ref_config: RefConfig = json::from_str(&serialized_cfg).unwrap_or_default();
let mut config: Config = Default::default();
let mut config = MockConfig::default();
config.scrolling.set_history(ref_config.history_size);
let mut terminal = Term::new(&config, size, MessageBuffer::new(), Clipboard::new_nop());
let mut terminal = Term::new(&config, &size, Clipboard::new_nop(), Mock);
let mut parser = ansi::Processor::new();
for byte in recording {